mirror of https://github.com/AxioDL/metaforce.git
Remove unnecessary glob regex
This commit is contained in:
parent
f6428c9407
commit
c0f060d6ad
|
@ -18,7 +18,7 @@
|
||||||
#include "hecl/Blender/BlenderConnection.hpp"
|
#include "hecl/Blender/BlenderConnection.hpp"
|
||||||
#include "logvisor/logvisor.hpp"
|
#include "logvisor/logvisor.hpp"
|
||||||
|
|
||||||
logvisor::Module LogModule("HECLDriver");
|
logvisor::Module LogModule("hecl::Driver");
|
||||||
|
|
||||||
#include "ToolBase.hpp"
|
#include "ToolBase.hpp"
|
||||||
#include "ToolInit.hpp"
|
#include "ToolInit.hpp"
|
||||||
|
|
|
@ -428,9 +428,9 @@ public:
|
||||||
/**
|
/**
|
||||||
* @brief Interrupts a cook in progress (call from SIGINT handler)
|
* @brief Interrupts a cook in progress (call from SIGINT handler)
|
||||||
*
|
*
|
||||||
* Database corruption is bad! sqlite is pretty robust at avoiding data corruption,
|
* Database corruption is bad! HECL spreads its data objects through
|
||||||
* but HECL spreads its data objects through the filesystem; this ensures that
|
* the filesystem; this ensures that open objects are cleanly
|
||||||
* those objects are cleanly finalized or discarded before stopping.
|
* finalized or discarded before stopping.
|
||||||
*
|
*
|
||||||
* Note that this method returns immediately; the resumed cookPath()
|
* Note that this method returns immediately; the resumed cookPath()
|
||||||
* call will return as quickly as possible.
|
* call will return as quickly as possible.
|
||||||
|
|
|
@ -655,7 +655,7 @@ public:
|
||||||
std::vector<std::pair<hecl::SystemString, std::string>> GetSystemLocations();
|
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
|
* Constructing a ProjectPath requires supplying a ProjectRootPath to consistently
|
||||||
* resolve canonicalized relative paths.
|
* resolve canonicalized relative paths.
|
||||||
|
|
|
@ -17,7 +17,7 @@ namespace hecl
|
||||||
namespace Database
|
namespace Database
|
||||||
{
|
{
|
||||||
|
|
||||||
logvisor::Module LogModule("HECLDatabase");
|
logvisor::Module LogModule("hecl::Database");
|
||||||
static const hecl::FourCC HECLfcc("HECL");
|
static const hecl::FourCC HECLfcc("HECL");
|
||||||
|
|
||||||
/**********************************************
|
/**********************************************
|
||||||
|
|
|
@ -4,7 +4,6 @@
|
||||||
|
|
||||||
namespace hecl
|
namespace hecl
|
||||||
{
|
{
|
||||||
static const SystemRegex regGLOB(_S("\\*"), SystemRegex::ECMAScript|SystemRegex::optimize);
|
|
||||||
static const SystemRegex regPATHCOMP(_S("[/\\\\]*([^/\\\\]+)"), SystemRegex::ECMAScript|SystemRegex::optimize);
|
static const SystemRegex regPATHCOMP(_S("[/\\\\]*([^/\\\\]+)"), SystemRegex::ECMAScript|SystemRegex::optimize);
|
||||||
static const SystemRegex regDRIVELETTER(_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
|
ProjectPath::Type ProjectPath::getPathType() const
|
||||||
{
|
{
|
||||||
if (std::regex_search(m_absPath, regGLOB))
|
if (m_absPath.find(_S('*')) != SystemString::npos)
|
||||||
return Type::Glob;
|
return Type::Glob;
|
||||||
Sstat theStat;
|
Sstat theStat;
|
||||||
if (hecl::Stat(m_absPath.c_str(), &theStat))
|
if (hecl::Stat(m_absPath.c_str(), &theStat))
|
||||||
|
@ -149,7 +148,7 @@ Time ProjectPath::getModtime() const
|
||||||
{
|
{
|
||||||
Sstat theStat;
|
Sstat theStat;
|
||||||
time_t latestTime = 0;
|
time_t latestTime = 0;
|
||||||
if (std::regex_search(m_absPath, regGLOB))
|
if (m_absPath.find(_S('*')) != SystemString::npos)
|
||||||
{
|
{
|
||||||
std::vector<ProjectPath> globResults;
|
std::vector<ProjectPath> globResults;
|
||||||
getGlobResults(globResults);
|
getGlobResults(globResults);
|
||||||
|
@ -198,7 +197,7 @@ static void _recursiveGlob(Database::Project& proj,
|
||||||
return;
|
return;
|
||||||
|
|
||||||
const SystemString& comp = matches[1];
|
const SystemString& comp = matches[1];
|
||||||
if (!std::regex_search(comp, regGLOB))
|
if (comp.find(_S('*')) != SystemString::npos)
|
||||||
{
|
{
|
||||||
SystemString nextItStr = itStr;
|
SystemString nextItStr = itStr;
|
||||||
if (needSlash)
|
if (needSlash)
|
||||||
|
|
Loading…
Reference in New Issue