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

@ -90,7 +90,7 @@ protected:
// search the technique contents for the desired parameter
for (S32 iParam = 0; iParam < pTechnique->getContents().getCount(); iParam++) {
const domAny* param = daeSafeCast<domAny>(pTechnique->getContents()[iParam]);
if (param && !dStrcmp(param->getElementName(), name))
if (param && !String::compare(param->getElementName(), name))
return param;
}
}

View file

@ -269,7 +269,7 @@ void AnimData::parseTargetString(const char* target, S32 fullCount, const char*
else if (const char* p2 = dStrrchr(target, '.')) {
// Check for named elements
for (S32 iElem = 0; elements[iElem][0] != 0; iElem++) {
if (!dStrcmp(p2, elements[iElem])) {
if (!String::compare(p2, elements[iElem])) {
targetValueOffset = iElem;
targetValueCount = 1;
break;

View file

@ -735,7 +735,7 @@ DefineTSShapeConstructorMethod( writeChangeSet, void, (),,
while ( !f.isEOF() )
{
const char* buffer = (const char *) f.readLine();
if ( !dStrcmp( buffer, beginMessage ))
if ( !String::compare( buffer, beginMessage ))
break;
stream->writeText( buffer );
stream->writeText( "\r\n" );
@ -756,7 +756,7 @@ DefineTSShapeConstructorMethod( writeChangeSet, void, (),,
while ( !f.isEOF() )
{
const char* buffer = (const char *) f.readLine();
if ( !dStrcmp( buffer, endMessage ))
if ( !String::compare( buffer, endMessage ))
break;
}

View file

@ -425,7 +425,7 @@ bool TSShape::addNode(const String& name, const String& parentName, const Point3
// Find the parent node (OK for name to be empty => node is at root level)
S32 parentIndex = -1;
if (dStrcmp(parentName, ""))
if (String::compare(parentName, ""))
{
parentIndex = findNode(parentName);
if (parentIndex < 0)

View file

@ -497,7 +497,7 @@ void TSShapeInstance::setMeshForceHidden( const char *meshName, bool hidden )
S32 nameIndex = iter->object->nameIndex;
const char *name = mShape->names[ nameIndex ];
if ( dStrcmp( meshName, name ) == 0 )
if ( String::compare( meshName, name ) == 0 )
{
iter->forceHidden = hidden;
return;