Remove unnecessary glob regex

This commit is contained in:
Jack Andersen 2016-09-24 15:57:43 -10:00
parent f6428c9407
commit c0f060d6ad
5 changed files with 9 additions and 10 deletions

View File

@ -18,7 +18,7 @@
#include "hecl/Blender/BlenderConnection.hpp"
#include "logvisor/logvisor.hpp"
logvisor::Module LogModule("HECLDriver");
logvisor::Module LogModule("hecl::Driver");
#include "ToolBase.hpp"
#include "ToolInit.hpp"

View File

@ -428,9 +428,9 @@ public:
/**
* @brief Interrupts a cook in progress (call from SIGINT handler)
*
* Database corruption is bad! sqlite is pretty robust at avoiding data corruption,
* but HECL spreads its data objects through the filesystem; this ensures that
* those objects are cleanly finalized or discarded before stopping.
* Database corruption is bad! HECL spreads its data objects through
* the filesystem; this ensures that open objects are cleanly
* finalized or discarded before stopping.
*
* Note that this method returns immediately; the resumed cookPath()
* call will return as quickly as possible.

View File

@ -655,7 +655,7 @@ public:
std::vector<std::pair<hecl::SystemString, std::string>> GetSystemLocations();
/**
* @brief Special ProjectRootPath class for opening HECLDatabase::IProject instances
* @brief Special ProjectRootPath class for opening Database::Project instances
*
* Constructing a ProjectPath requires supplying a ProjectRootPath to consistently
* resolve canonicalized relative paths.

View File

@ -17,7 +17,7 @@ namespace hecl
namespace Database
{
logvisor::Module LogModule("HECLDatabase");
logvisor::Module LogModule("hecl::Database");
static const hecl::FourCC HECLfcc("HECL");
/**********************************************

View File

@ -4,7 +4,6 @@
namespace hecl
{
static const SystemRegex regGLOB(_S("\\*"), SystemRegex::ECMAScript|SystemRegex::optimize);
static const SystemRegex regPATHCOMP(_S("[/\\\\]*([^/\\\\]+)"), SystemRegex::ECMAScript|SystemRegex::optimize);
static const SystemRegex regDRIVELETTER(_S("^([^/]*)/"), SystemRegex::ECMAScript|SystemRegex::optimize);
@ -133,7 +132,7 @@ ProjectPath ProjectPath::getCookedPath(const Database::DataSpecEntry& spec) cons
ProjectPath::Type ProjectPath::getPathType() const
{
if (std::regex_search(m_absPath, regGLOB))
if (m_absPath.find(_S('*')) != SystemString::npos)
return Type::Glob;
Sstat theStat;
if (hecl::Stat(m_absPath.c_str(), &theStat))
@ -149,7 +148,7 @@ Time ProjectPath::getModtime() const
{
Sstat theStat;
time_t latestTime = 0;
if (std::regex_search(m_absPath, regGLOB))
if (m_absPath.find(_S('*')) != SystemString::npos)
{
std::vector<ProjectPath> globResults;
getGlobResults(globResults);
@ -198,7 +197,7 @@ static void _recursiveGlob(Database::Project& proj,
return;
const SystemString& comp = matches[1];
if (!std::regex_search(comp, regGLOB))
if (comp.find(_S('*')) != SystemString::npos)
{
SystemString nextItStr = itStr;
if (needSlash)