mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-02-13 03:33:48 +00:00
Moves from using dStrCmp to the new String::compare static functions. Keeps things cleaner, consistent, and works with intellisense.
This commit is contained in:
parent
76c5e30869
commit
c999baf7ed
68 changed files with 168 additions and 144 deletions
|
|
@ -890,10 +890,10 @@ PersistenceManager::ParsedObject* PersistenceManager::findParsedObject(SimObject
|
|||
{
|
||||
const ParsedProperty &prop = testObj->properties[j];
|
||||
|
||||
if ( dStrcmp( prop.name, "internalName" ) == 0 &&
|
||||
dStrcmp( prop.value, object->getInternalName() ) == 0 )
|
||||
if ( String::compare( prop.name, "internalName" ) == 0 &&
|
||||
String::compare( prop.value, object->getInternalName() ) == 0 )
|
||||
return testObj;
|
||||
else if ( dStrcmp(prop.name, "internalName") == 0)
|
||||
else if ( String::compare(prop.name, "internalName") == 0)
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
|
@ -1544,7 +1544,7 @@ void PersistenceManager::updateObject(SimObject* object, ParsedObject* parentObj
|
|||
if( object->getCopySource() )
|
||||
{
|
||||
const char* copySourceFieldValue = object->getCopySource()->getDataField( entry->slotName, NULL );
|
||||
if( dStrcmp( copySourceFieldValue, entry->value ) == 0 )
|
||||
if( String::compare( copySourceFieldValue, entry->value ) == 0 )
|
||||
{
|
||||
removeField( prop );
|
||||
continue;
|
||||
|
|
@ -1576,7 +1576,7 @@ void PersistenceManager::updateObject(SimObject* object, ParsedObject* parentObj
|
|||
if( object->getCopySource() )
|
||||
{
|
||||
const char* copySourceFieldValue = object->getCopySource()->getDataField( entry->slotName, NULL );
|
||||
if( dStrcmp( copySourceFieldValue, entry->value ) == 0 )
|
||||
if( String::compare( copySourceFieldValue, entry->value ) == 0 )
|
||||
continue;
|
||||
}
|
||||
|
||||
|
|
@ -2201,7 +2201,7 @@ DefineEngineMethod( PersistenceManager, setDirty, void, ( const char * objName,
|
|||
"Mark an existing SimObject as dirty (will be written out when saveDirty() is called).")
|
||||
{
|
||||
SimObject *dirtyObject = NULL;
|
||||
if (dStrcmp(objName,"") != 0)
|
||||
if (String::compare(objName,"") != 0)
|
||||
{
|
||||
if (!Sim::findObject(objName, dirtyObject))
|
||||
{
|
||||
|
|
@ -2219,7 +2219,7 @@ DefineEngineMethod( PersistenceManager, setDirty, void, ( const char * objName,
|
|||
|
||||
if (dirtyObject)
|
||||
{
|
||||
if (dStrcmp( fileName,"")!=0)
|
||||
if (String::compare( fileName,"")!=0)
|
||||
object->setDirty(dirtyObject, fileName);
|
||||
else
|
||||
object->setDirty(dirtyObject);
|
||||
|
|
@ -2230,7 +2230,7 @@ DefineEngineMethod( PersistenceManager, removeDirty, void, ( const char * objNam
|
|||
"Remove a SimObject from the dirty list.")
|
||||
{
|
||||
SimObject *dirtyObject = NULL;
|
||||
if (dStrcmp( objName,"")!=0)
|
||||
if (String::compare( objName,"")!=0)
|
||||
{
|
||||
if (!Sim::findObject(objName, dirtyObject))
|
||||
{
|
||||
|
|
@ -2364,7 +2364,7 @@ DefineEngineMethod( PersistenceManager, removeObjectFromFile, void, (const char
|
|||
|
||||
if (dirtyObject)
|
||||
{
|
||||
if (dStrcmp( filename,"")!=0)
|
||||
if (String::compare( filename,"")!=0)
|
||||
object->removeObjectFromFile(dirtyObject, filename);
|
||||
else
|
||||
object->removeObjectFromFile(dirtyObject);
|
||||
|
|
@ -2375,7 +2375,7 @@ DefineEngineMethod( PersistenceManager, removeField, void, (const char * objName
|
|||
"Remove a specific field from an object declaration.")
|
||||
{
|
||||
SimObject *dirtyObject = NULL;
|
||||
if (dStrcmp(objName,"")!=0)
|
||||
if (String::compare(objName,"")!=0)
|
||||
{
|
||||
if (!Sim::findObject(objName, dirtyObject))
|
||||
{
|
||||
|
|
@ -2386,7 +2386,7 @@ DefineEngineMethod( PersistenceManager, removeField, void, (const char * objName
|
|||
|
||||
if (dirtyObject)
|
||||
{
|
||||
if (dStrcmp(fieldName,"") != 0)
|
||||
if (String::compare(fieldName,"") != 0)
|
||||
object->addRemoveField(dirtyObject, fieldName);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue