Moves from using dStrCmp to the new String::compare static functions. Keeps things cleaner, consistent, and works with intellisense.

This commit is contained in:
Lukas Aldershaab 2020-10-03 14:37:55 +02:00
parent 76c5e30869
commit c999baf7ed
68 changed files with 168 additions and 144 deletions

View file

@ -206,7 +206,7 @@ void Platform::clearExcludedDirectories()
bool Platform::isExcludedDirectory(const char *pDir)
{
for(CharVector::iterator i=gPlatformDirectoryExcludeList.begin(); i!=gPlatformDirectoryExcludeList.end(); i++)
if(!dStrcmp(pDir, *i))
if(!String::compare(pDir, *i))
return true;
return false;
@ -349,18 +349,18 @@ char * Platform::makeFullPathName(const char *path, char *buffer, U32 size, cons
// Directory
if(dStrcmp(ptr, "..") == 0)
if(String::compare(ptr, "..") == 0)
{
// Parent
endptr = dStrrchr(buffer, '/');
if (endptr)
*endptr-- = 0;
}
else if(dStrcmp(ptr, ".") == 0)
else if(String::compare(ptr, ".") == 0)
{
// Current dir
}
else if(dStrcmp(ptr, "~") == 0)
else if(String::compare(ptr, "~") == 0)
{
catPath(endptr, defaultDir, size - (endptr - buffer));
endptr += dStrlen(endptr) - 1;

View file

@ -215,7 +215,7 @@ DefineEngineFunction( redbookOpen, bool, (const char * device), (""), "(string d
"@brief Deprecated\n\n"
"@internal")
{
if(dStrcmp(device,"")==0)
if(String::compare(device,"")==0)
return(RedBook::open(RedBook::getDeviceName(0)));
else
return(RedBook::open(device));

View file

@ -260,7 +260,7 @@ static Profiler aProfiler; // allocate the global profiler
ProfilerRootData::ProfilerRootData(const char *name)
{
for(ProfilerRootData *walk = sRootList; walk; walk = walk->mNextRoot)
if(!dStrcmp(walk->mName, name))
if(!String::compare(walk->mName, name))
AssertFatal( false, avar( "Duplicate profile name: %s", name ) );
mName = name;
@ -702,7 +702,7 @@ void Profiler::enableMarker(const char *marker, bool enable)
}
else
{
if(!dStrcmp(marker, data->mName))
if(!String::compare(marker, data->mName))
data->mEnabled = enable;
}
}