mirror of https://github.com/AxioDL/metaforce.git
Minor improvements
This commit is contained in:
parent
b7208bfc5f
commit
5e99ee1d95
|
@ -260,6 +260,8 @@ static hecl::SystemString MakePathArgAbsolute(const hecl::SystemString& arg,
|
|||
#else
|
||||
if (arg[0] == _S('/') || arg[0] == _S('\\'))
|
||||
return arg;
|
||||
if (cwd.back() == _S('/') || cwd.back() == _S('\\'))
|
||||
return cwd + arg;
|
||||
return cwd + _S('/') + arg;
|
||||
#endif
|
||||
}
|
||||
|
|
|
@ -503,6 +503,7 @@ public:
|
|||
uint32_t toUint32() const {return num;}
|
||||
operator uint32_t() const {return num;}
|
||||
const char* getChars() const {return fcc;}
|
||||
char* getChars() {return fcc;}
|
||||
};
|
||||
#define FOURCC(chars) FourCC(SBIG(chars))
|
||||
|
||||
|
|
|
@ -323,6 +323,8 @@ ProjectRootPath SearchForProject(const SystemString& path, SystemString& subpath
|
|||
SystemString::const_iterator origEnd = testRoot.getAbsolutePath().end();
|
||||
while (end != origEnd && *end != _S('/') && *end != _S('\\'))
|
||||
++end;
|
||||
if (*end == _S('/') || *end == _S('\\'))
|
||||
++end;
|
||||
subpathOut.assign(end, origEnd);
|
||||
return newRootPath;
|
||||
}
|
||||
|
|
|
@ -215,6 +215,8 @@ bool IsPathBlend(const hecl::ProjectPath& path)
|
|||
|
||||
bool IsPathYAML(const hecl::ProjectPath& path)
|
||||
{
|
||||
if (!hecl::StrCmp(path.getLastComponent(), _S("!catalog.yaml")))
|
||||
return false; /* !catalog.yaml is exempt from general use */
|
||||
const SystemChar* lastCompExt = path.getLastComponentExt();
|
||||
if (!lastCompExt)
|
||||
return false;
|
||||
|
|
Loading…
Reference in New Issue