Browse Source

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

Lukas Aldershaab 4 years ago
parent
commit
c999baf7ed
68 changed files with 168 additions and 144 deletions
  1. 2 2
      Engine/source/T3D/aiClient.cpp
  2. 3 3
      Engine/source/T3D/aiPlayer.cpp
  3. 1 1
      Engine/source/T3D/fx/fxShapeReplicator.cpp
  4. 2 2
      Engine/source/T3D/gameBase/gameConnection.cpp
  5. 1 1
      Engine/source/T3D/gameBase/gameConnectionEvents.cpp
  6. 1 1
      Engine/source/T3D/player.cpp
  7. 1 1
      Engine/source/app/mainLoop.cpp
  8. 7 7
      Engine/source/app/net/serverQuery.cpp
  9. 1 1
      Engine/source/console/compiler.cpp
  10. 1 1
      Engine/source/console/console.cpp
  11. 1 1
      Engine/source/console/consoleDoc.cpp
  12. 4 4
      Engine/source/console/consoleFunctions.cpp
  13. 4 4
      Engine/source/console/consoleInternal.cpp
  14. 1 1
      Engine/source/console/consoleObject.cpp
  15. 2 2
      Engine/source/console/dynamicTypes.cpp
  16. 3 3
      Engine/source/console/fieldBrushObject.cpp
  17. 1 1
      Engine/source/console/fileSystemFunctions.cpp
  18. 11 11
      Engine/source/console/persistenceManager.cpp
  19. 1 1
      Engine/source/console/sim.cpp
  20. 2 2
      Engine/source/console/simObject.cpp
  21. 1 1
      Engine/source/core/fileObject.cpp
  22. 2 2
      Engine/source/core/stringTable.cpp
  23. 1 1
      Engine/source/core/stringTable.h
  24. 2 2
      Engine/source/core/strings/stringFunctions.cpp
  25. 23 1
      Engine/source/core/util/str.cpp
  26. 2 0
      Engine/source/core/util/str.h
  27. 1 1
      Engine/source/core/util/tDictionary.h
  28. 2 2
      Engine/source/core/util/test/strTest.cpp
  29. 1 1
      Engine/source/environment/editors/guiRiverEditorCtrl.cpp
  30. 1 1
      Engine/source/environment/editors/guiRoadEditorCtrl.cpp
  31. 2 2
      Engine/source/gui/controls/guiFileTreeCtrl.cpp
  32. 1 1
      Engine/source/gui/controls/guiGameListOptionsCtrl.cpp
  33. 4 4
      Engine/source/gui/controls/guiListBoxCtrl.cpp
  34. 2 2
      Engine/source/gui/controls/guiPopUpCtrl.cpp
  35. 2 2
      Engine/source/gui/controls/guiPopUpCtrlEx.cpp
  36. 1 1
      Engine/source/gui/controls/guiTextEditCtrl.cpp
  37. 3 3
      Engine/source/gui/controls/guiTreeViewCtrl.cpp
  38. 1 1
      Engine/source/gui/core/guiControl.cpp
  39. 1 1
      Engine/source/gui/editor/inspector/dynamicField.cpp
  40. 1 1
      Engine/source/gui/editor/inspector/field.cpp
  41. 1 1
      Engine/source/gui/worldEditor/guiConvexShapeEditorCtrl.cpp
  42. 1 1
      Engine/source/gui/worldEditor/guiDecalEditorCtrl.cpp
  43. 1 1
      Engine/source/gui/worldEditor/guiMissionAreaEditor.cpp
  44. 7 7
      Engine/source/gui/worldEditor/terrainEditor.cpp
  45. 5 5
      Engine/source/materials/materialDefinition.cpp
  46. 1 1
      Engine/source/materials/processedShaderMaterial.cpp
  47. 3 3
      Engine/source/navigation/navPath.cpp
  48. 4 4
      Engine/source/platform/platformFileIO.cpp
  49. 1 1
      Engine/source/platform/platformRedBook.cpp
  50. 2 2
      Engine/source/platform/profiler.cpp
  51. 4 4
      Engine/source/platformWin32/winFileio.cpp
  52. 2 2
      Engine/source/sfx/openal/aldlist.cpp
  53. 2 2
      Engine/source/sfx/sfxSource.cpp
  54. 3 3
      Engine/source/shaderGen/HLSL/shaderCompHLSL.cpp
  55. 5 5
      Engine/source/shaderGen/HLSL/shaderFeatureHLSL.cpp
  56. 1 1
      Engine/source/shaderGen/langElement.cpp
  57. 1 1
      Engine/source/sim/netConnection.cpp
  58. 1 1
      Engine/source/sim/netStringTable.cpp
  59. 1 1
      Engine/source/terrain/terrCell.cpp
  60. 1 1
      Engine/source/terrain/terrCellMaterial.cpp
  61. 1 1
      Engine/source/ts/collada/colladaExtensions.h
  62. 1 1
      Engine/source/ts/collada/colladaUtils.cpp
  63. 2 2
      Engine/source/ts/tsShapeConstruct.cpp
  64. 1 1
      Engine/source/ts/tsShapeEdit.cpp
  65. 1 1
      Engine/source/ts/tsShapeInstance.cpp
  66. 1 1
      Engine/source/util/messaging/eventManager.cpp
  67. 9 9
      Engine/source/util/settings.cpp
  68. 1 1
      Engine/source/windowManager/win32/winDispatch.cpp

+ 2 - 2
Engine/source/T3D/aiClient.cpp

@@ -403,7 +403,7 @@ void AIClient::onAdd( const char *nameSpace ) {
 
 
    // This doesn't work...
    // This doesn't work...
    //
    //
-   if( dStrcmp( nameSpace, mNameSpace->mName ) ) {
+   if( String::compare( nameSpace, mNameSpace->mName ) ) {
       Con::linkNamespaces( mNameSpace->mName, nameSpace );
       Con::linkNamespaces( mNameSpace->mName, nameSpace );
       mNameSpace = Con::lookupNamespace( nameSpace );
       mNameSpace = Con::lookupNamespace( nameSpace );
    }
    }
@@ -547,7 +547,7 @@ DefineEngineFunction( aiAddPlayer, S32, (const char * name, const char * ns), ("
    aiPlayer->onConnect_callback( name );
    aiPlayer->onConnect_callback( name );
 
 
    // Now execute the onAdd command and feed it the namespace
    // Now execute the onAdd command and feed it the namespace
-   if(dStrcmp( ns,"" ) != 0 )
+   if(String::compare( ns,"" ) != 0 )
       aiPlayer->onAdd( ns );
       aiPlayer->onAdd( ns );
    else
    else
       aiPlayer->onAdd( "AIClient" );
       aiPlayer->onAdd( "AIClient" );

+ 3 - 3
Engine/source/T3D/aiPlayer.cpp

@@ -1108,11 +1108,11 @@ DefineEngineMethod(AIPlayer, getNavMesh, S32, (),,
 DefineEngineMethod(AIPlayer, setNavSize, void, (const char *size),,
 DefineEngineMethod(AIPlayer, setNavSize, void, (const char *size),,
    "@brief Set the size of NavMesh this character uses. One of \"Small\", \"Regular\" or \"Large\".")
    "@brief Set the size of NavMesh this character uses. One of \"Small\", \"Regular\" or \"Large\".")
 {
 {
-   if(!dStrcmp(size, "Small"))
+   if(!String::compare(size, "Small"))
       object->setNavSize(AIPlayer::Small);
       object->setNavSize(AIPlayer::Small);
-   else if(!dStrcmp(size, "Regular"))
+   else if(!String::compare(size, "Regular"))
       object->setNavSize(AIPlayer::Regular);
       object->setNavSize(AIPlayer::Regular);
-   else if(!dStrcmp(size, "Large"))
+   else if(!String::compare(size, "Large"))
       object->setNavSize(AIPlayer::Large);
       object->setNavSize(AIPlayer::Large);
    else
    else
       Con::errorf("AIPlayer::setNavSize: no such size '%s'.", size);
       Con::errorf("AIPlayer::setNavSize: no such size '%s'.", size);

+ 1 - 1
Engine/source/T3D/fx/fxShapeReplicator.cpp

@@ -209,7 +209,7 @@ void fxShapeReplicator::CreateShapes(void)
    if (mFieldData.mHideReplications) return;
    if (mFieldData.mHideReplications) return;
 
 
    // Cannot continue without shapes!
    // Cannot continue without shapes!
-   if (dStrcmp(mFieldData.mShapeFile, "") == 0) return;
+   if (String::compare(mFieldData.mShapeFile, "") == 0) return;
 
 
    // Check that we can position somewhere!
    // Check that we can position somewhere!
    if (!(	mFieldData.mAllowOnTerrain ||
    if (!(	mFieldData.mAllowOnTerrain ||

+ 2 - 2
Engine/source/T3D/gameBase/gameConnection.cpp

@@ -454,7 +454,7 @@ bool GameConnection::readConnectRequest(BitStream *stream, const char **errorStr
    U32 currentProtocol, minProtocol;
    U32 currentProtocol, minProtocol;
    char gameString[256];
    char gameString[256];
    stream->readString(gameString);
    stream->readString(gameString);
-   if(dStrcmp(gameString, TORQUE_APP_NAME))
+   if(String::compare(gameString, TORQUE_APP_NAME))
    {
    {
       *errorString = "CHR_GAME";
       *errorString = "CHR_GAME";
       return false;
       return false;
@@ -481,7 +481,7 @@ bool GameConnection::readConnectRequest(BitStream *stream, const char **errorStr
    const char *serverPassword = Con::getVariable("pref::Server::Password");
    const char *serverPassword = Con::getVariable("pref::Server::Password");
    if(serverPassword[0])
    if(serverPassword[0])
    {
    {
-      if(dStrcmp(joinPassword, serverPassword))
+      if(String::compare(joinPassword, serverPassword))
       {
       {
          *errorString = "CHR_PASSWORD";
          *errorString = "CHR_PASSWORD";
          return false;
          return false;

+ 1 - 1
Engine/source/T3D/gameBase/gameConnectionEvents.cpp

@@ -191,7 +191,7 @@ void SimDataBlockEvent::unpack(NetConnection *cptr, BitStream *bstream)
          // An object with the given ID already exists.  Make sure it has the right class.
          // An object with the given ID already exists.  Make sure it has the right class.
          
          
          AbstractClassRep* classRep = AbstractClassRep::findClassRep( cptr->getNetClassGroup(), NetClassTypeDataBlock, classId );
          AbstractClassRep* classRep = AbstractClassRep::findClassRep( cptr->getNetClassGroup(), NetClassTypeDataBlock, classId );
-         if( classRep && dStrcmp( classRep->getClassName(), ptr->getClassName() ) != 0 )
+         if( classRep && String::compare( classRep->getClassName(), ptr->getClassName() ) != 0 )
          {
          {
             Con::warnf( "A '%s' datablock with id: %d already existed. "
             Con::warnf( "A '%s' datablock with id: %d already existed. "
                         "Clobbering it with new '%s' datablock from server.",
                         "Clobbering it with new '%s' datablock from server.",

+ 1 - 1
Engine/source/T3D/player.cpp

@@ -2416,7 +2416,7 @@ void Player::getDamageLocation(const Point3F& in_rPos, const char *&out_rpVert,
    else
    else
       out_rpVert = "head";
       out_rpVert = "head";
 
 
-   if(dStrcmp(out_rpVert, "head") != 0)
+   if(String::compare(out_rpVert, "head") != 0)
    {
    {
       if (newPoint.y >= 0.0f)
       if (newPoint.y >= 0.0f)
       {
       {

+ 1 - 1
Engine/source/app/mainLoop.cpp

@@ -466,7 +466,7 @@ bool StandardMainLoop::handleCommandLine( S32 argc, const char **argv )
    if (argc > 1)
    if (argc > 1)
    {
    {
       // If so, check if the first parameter is a file to open.
       // If so, check if the first parameter is a file to open.
-      if ( (dStrcmp(argv[1], "") != 0 ) && (str.open(argv[1], Torque::FS::File::Read)) )
+      if ( (String::compare(argv[1], "") != 0 ) && (str.open(argv[1], Torque::FS::File::Read)) )
       {
       {
          // If it opens, we assume it is the script to run.
          // If it opens, we assume it is the script to run.
          useDefaultScript = false;
          useDefaultScript = false;

+ 7 - 7
Engine/source/app/net/serverQuery.cpp

@@ -508,14 +508,14 @@ void queryMasterServer(U8 flags, const char* gameType, const char* missionType,
       sActiveFilter.type = ServerFilter::Normal;
       sActiveFilter.type = ServerFilter::Normal;
 
 
       // Update the active filter:
       // Update the active filter:
-      if ( !sActiveFilter.gameType || dStrcmp( sActiveFilter.gameType, gameType ) != 0 )
+      if ( !sActiveFilter.gameType || String::compare( sActiveFilter.gameType, gameType ) != 0 )
       {
       {
          dsize_t gameTypeLen = dStrlen(gameType) + 1;
          dsize_t gameTypeLen = dStrlen(gameType) + 1;
          sActiveFilter.gameType = (char*) dRealloc( sActiveFilter.gameType, gameTypeLen );
          sActiveFilter.gameType = (char*) dRealloc( sActiveFilter.gameType, gameTypeLen );
          dStrcpy( sActiveFilter.gameType, gameType, gameTypeLen );
          dStrcpy( sActiveFilter.gameType, gameType, gameTypeLen );
       }
       }
 
 
-      if ( !sActiveFilter.missionType || dStrcmp( sActiveFilter.missionType, missionType ) != 0 )
+      if ( !sActiveFilter.missionType || String::compare( sActiveFilter.missionType, missionType ) != 0 )
       {
       {
          dsize_t missionTypeLen = dStrlen(missionType) + 1;
          dsize_t missionTypeLen = dStrlen(missionType) + 1;
          sActiveFilter.missionType = (char*) dRealloc( sActiveFilter.missionType, missionTypeLen );
          sActiveFilter.missionType = (char*) dRealloc( sActiveFilter.missionType, missionTypeLen );
@@ -1855,7 +1855,7 @@ static void handleGamePingResponse( const NetAddress* address, BitStream* stream
    // Verify the version:
    // Verify the version:
    char buf[256];
    char buf[256];
    stream->readString( buf );
    stream->readString( buf );
-   if ( dStrcmp( buf, versionString ) != 0 )
+   if ( String::compare( buf, versionString ) != 0 )
    {
    {
       // Version is different, so remove it from consideration:
       // Version is different, so remove it from consideration:
       Con::printf( "Server %s is a different version.", addrString );
       Con::printf( "Server %s is a different version.", addrString );
@@ -2070,7 +2070,7 @@ static void handleGameInfoResponse( const NetAddress* address, BitStream* stream
 
 
    // Get the mission type:
    // Get the mission type:
    stream->readString( stringBuf );
    stream->readString( stringBuf );
-   if ( !si->missionType || dStrcmp( si->missionType, stringBuf ) != 0 )
+   if ( !si->missionType || String::compare( si->missionType, stringBuf ) != 0 )
    {
    {
       dsize_t missionTypeLen = dStrlen(stringBuf) + 1;
       dsize_t missionTypeLen = dStrlen(stringBuf) + 1;
       si->missionType = (char*) dRealloc( (void*) si->missionType, missionTypeLen );
       si->missionType = (char*) dRealloc( (void*) si->missionType, missionTypeLen );
@@ -2092,7 +2092,7 @@ static void handleGameInfoResponse( const NetAddress* address, BitStream* stream
    char* temp = dStrstr( static_cast<char*>( stringBuf ), const_cast<char*>( ".mis" ) );
    char* temp = dStrstr( static_cast<char*>( stringBuf ), const_cast<char*>( ".mis" ) );
    if ( temp )
    if ( temp )
       *temp = '\0';
       *temp = '\0';
-   if ( !si->missionName || dStrcmp( si->missionName, stringBuf ) != 0 )
+   if ( !si->missionName || String::compare( si->missionName, stringBuf ) != 0 )
    {
    {
       dsize_t missionNameLen = dStrlen(stringBuf) + 1;
       dsize_t missionNameLen = dStrlen(stringBuf) + 1;
       si->missionName = (char*) dRealloc( (void*) si->missionName, missionNameLen );
       si->missionName = (char*) dRealloc( (void*) si->missionName, missionNameLen );
@@ -2162,7 +2162,7 @@ static void handleGameInfoResponse( const NetAddress* address, BitStream* stream
 
 
    // Get the server info:
    // Get the server info:
    stream->readString( stringBuf );
    stream->readString( stringBuf );
-   if ( !si->statusString || ( isUpdate && dStrcmp( si->statusString, stringBuf ) != 0 ) )
+   if ( !si->statusString || ( isUpdate && String::compare( si->statusString, stringBuf ) != 0 ) )
    {
    {
       dsize_t infoLen = dStrlen(stringBuf) + 1;
       dsize_t infoLen = dStrlen(stringBuf) + 1;
       si->infoString = (char*) dRealloc( (void*) si->infoString, infoLen );
       si->infoString = (char*) dRealloc( (void*) si->infoString, infoLen );
@@ -2171,7 +2171,7 @@ static void handleGameInfoResponse( const NetAddress* address, BitStream* stream
 
 
    // Get the content string:
    // Get the content string:
    readLongCString( stream, stringBuf );
    readLongCString( stream, stringBuf );
-   if ( !si->statusString || ( isUpdate && dStrcmp( si->statusString, stringBuf ) != 0 ) )
+   if ( !si->statusString || ( isUpdate && String::compare( si->statusString, stringBuf ) != 0 ) )
    {
    {
       dsize_t statusLen = dStrlen(stringBuf) + 1;
       dsize_t statusLen = dStrlen(stringBuf) + 1;
       si->statusString = (char*) dRealloc( (void*) si->statusString, statusLen );
       si->statusString = (char*) dRealloc( (void*) si->statusString, statusLen );

+ 1 - 1
Engine/source/console/compiler.cpp

@@ -142,7 +142,7 @@ U32 CompilerStringTable::add(const char *str, bool caseSens, bool tag)
 
 
       if (caseSens)
       if (caseSens)
       {
       {
-         if (!dStrcmp((*walk)->string, str))
+         if (!String::compare((*walk)->string, str))
             return (*walk)->start;
             return (*walk)->start;
       }
       }
       else
       else

+ 1 - 1
Engine/source/console/console.cpp

@@ -437,7 +437,7 @@ U32 tabComplete(char* inputBuffer, U32 cursorPos, U32 maxResultLength, bool forw
    }
    }
 
 
    // See if this is the same partial text as last checked.
    // See if this is the same partial text as last checked.
-   if (dStrcmp(tabBuffer, inputBuffer)) 
+   if (String::compare(tabBuffer, inputBuffer)) 
    {
    {
       // If not...
       // If not...
       // Save it for checking next time.
       // Save it for checking next time.

+ 1 - 1
Engine/source/console/consoleDoc.cpp

@@ -135,7 +135,7 @@ void printClassHeader(const char* usage, const char * className, const char * su
          }
          }
 
 
          // Print all fields that aren't associated with the 'field' keyword.
          // Print all fields that aren't associated with the 'field' keyword.
-         if( dStrcmp( keyword, "field" ) )
+         if( String::compare( keyword, "field" ) )
             Con::printf( "%s", lineStr );    // print lineStr as an unformatted string (otherwise '%' characters in the string could cause problems)
             Con::printf( "%s", lineStr );    // print lineStr as an unformatted string (otherwise '%' characters in the string could cause problems)
 
 
 
 

+ 4 - 4
Engine/source/console/consoleFunctions.cpp

@@ -266,7 +266,7 @@ DefineEngineFunction( strcmp, S32, ( const char* str1, const char* str2 ),,
    "@see strnatcmp\n"
    "@see strnatcmp\n"
    "@ingroup Strings" )
    "@ingroup Strings" )
 {
 {
-   return dStrcmp( str1, str2 );
+   return String::compare( str1, str2 );
 }
 }
 
 
 //-----------------------------------------------------------------------------
 //-----------------------------------------------------------------------------
@@ -949,7 +949,7 @@ DefineEngineFunction( endsWith, bool, ( const char* str, const char* suffix, boo
       return false;
       return false;
       
       
    if( caseSensitive )
    if( caseSensitive )
-      return ( dStrcmp( &str[ srcLen - targetLen ], suffix ) == 0 );
+      return ( String::compare( &str[ srcLen - targetLen ], suffix ) == 0 );
 
 
    // both src and target are non empty, create temp buffers for lowercase operation
    // both src and target are non empty, create temp buffers for lowercase operation
    char* srcBuf = new char[ srcLen + 1 ];
    char* srcBuf = new char[ srcLen + 1 ];
@@ -967,7 +967,7 @@ DefineEngineFunction( endsWith, bool, ( const char* str, const char* suffix, boo
    str += srcLen - targetLen;
    str += srcLen - targetLen;
 
 
    // do the comparison
    // do the comparison
-   bool endsWith = dStrcmp( str, suffix ) == 0;
+   bool endsWith = String::compare( str, suffix ) == 0;
 
 
    // delete temp buffers
    // delete temp buffers
    delete [] srcBuf;
    delete [] srcBuf;
@@ -2577,7 +2577,7 @@ DefineEngineFunction( isDefined, bool, ( const char* varName, const char* varVal
    else
    else
    {
    {
       // Is it an object?
       // Is it an object?
-      if (dStrcmp(varName, "0") && dStrcmp(varName, "") && (Sim::findObject(varName) != NULL))
+      if (String::compare(varName, "0") && String::compare(varName, "") && (Sim::findObject(varName) != NULL))
          return true;
          return true;
       else if (!String::isEmpty(varValue))
       else if (!String::isEmpty(varValue))
       {
       {

+ 4 - 4
Engine/source/console/consoleInternal.cpp

@@ -1616,13 +1616,13 @@ namespace {
       if (dStrncmp(nativeType, "const ", 6) == 0)
       if (dStrncmp(nativeType, "const ", 6) == 0)
          nativeType += 6;
          nativeType += 6;
 
 
-      if (dStrcmp(nativeType, "char*") == 0 || dStrcmp(nativeType, "char *") == 0)
+      if (String::compare(nativeType, "char*") == 0 || String::compare(nativeType, "char *") == 0)
          return "string";
          return "string";
-      else if (dStrcmp(nativeType, "S32") == 0)
+      else if (String::compare(nativeType, "S32") == 0)
          return "int";
          return "int";
-      else if (dStrcmp(nativeType, "U32") == 0)
+      else if (String::compare(nativeType, "U32") == 0)
          return "uint";
          return "uint";
-      else if (dStrcmp(nativeType, "F32") == 0)
+      else if (String::compare(nativeType, "F32") == 0)
          return "float";
          return "float";
 
 
       const U32 length = dStrlen(nativeType);
       const U32 length = dStrlen(nativeType);

+ 1 - 1
Engine/source/console/consoleObject.cpp

@@ -140,7 +140,7 @@ void AbstractClassRep::registerClassRep(AbstractClassRep* in_pRep)
 #ifdef TORQUE_DEBUG  // assert if this class is already registered.
 #ifdef TORQUE_DEBUG  // assert if this class is already registered.
    for(AbstractClassRep *walk = classLinkList; walk; walk = walk->nextClass)
    for(AbstractClassRep *walk = classLinkList; walk; walk = walk->nextClass)
    {
    {
-      AssertFatal(dStrcmp(in_pRep->mClassName, walk->mClassName),
+      AssertFatal(String::compare(in_pRep->mClassName, walk->mClassName),
          "Duplicate class name registered in AbstractClassRep::registerClassRep()");
          "Duplicate class name registered in AbstractClassRep::registerClassRep()");
    }
    }
 #endif
 #endif

+ 2 - 2
Engine/source/console/dynamicTypes.cpp

@@ -93,7 +93,7 @@ ConsoleBaseType* ConsoleBaseType::getTypeByName(const char *typeName)
    ConsoleBaseType* walk = getListHead();
    ConsoleBaseType* walk = getListHead();
    while( walk != NULL )
    while( walk != NULL )
    {
    {
-      if( dStrcmp( walk->getTypeName(), typeName ) == 0 )
+      if( String::compare( walk->getTypeName(), typeName ) == 0 )
          return walk;
          return walk;
 
 
       walk = walk->getListNext();
       walk = walk->getListNext();
@@ -109,7 +109,7 @@ ConsoleBaseType * ConsoleBaseType::getTypeByClassName(const char *typeName)
    ConsoleBaseType *walk = getListHead();
    ConsoleBaseType *walk = getListHead();
    while( walk != NULL )
    while( walk != NULL )
    {
    {
-      if( dStrcmp( walk->getTypeClassName(), typeName ) == 0 )
+      if( String::compare( walk->getTypeClassName(), typeName ) == 0 )
          return walk;
          return walk;
 
 
       walk = walk->getListNext();
       walk = walk->getListNext();

+ 3 - 3
Engine/source/console/fieldBrushObject.cpp

@@ -391,7 +391,7 @@ DefineEngineMethod(FieldBrushObject, copyFields, void, (const char* simObjName,
 void FieldBrushObject::copyFields( SimObject* pSimObject, const char* fieldList )
 void FieldBrushObject::copyFields( SimObject* pSimObject, const char* fieldList )
 {
 {
     // FieldBrushObject class?   
     // FieldBrushObject class?   
-    if ( dStrcmp(pSimObject->getClassName(), getClassName()) == 0 )
+    if ( String::compare(pSimObject->getClassName(), getClassName()) == 0 )
     {
     {
         // Yes, so warn.
         // Yes, so warn.
         Con::warnf("FieldBrushObject::copyFields() - Cannot copy FieldBrushObject objects!");
         Con::warnf("FieldBrushObject::copyFields() - Cannot copy FieldBrushObject objects!");
@@ -522,7 +522,7 @@ DefineEngineMethod(FieldBrushObject, pasteFields, void, (const char* simObjName)
 void FieldBrushObject::pasteFields( SimObject* pSimObject )
 void FieldBrushObject::pasteFields( SimObject* pSimObject )
 {
 {
     // FieldBrushObject class?   
     // FieldBrushObject class?   
-    if ( dStrcmp(pSimObject->getClassName(), getClassName()) == 0 )
+    if ( String::compare(pSimObject->getClassName(), getClassName()) == 0 )
     {
     {
         // Yes, so warn.
         // Yes, so warn.
         Con::warnf("FieldBrushObject::pasteFields() - Cannot paste FieldBrushObject objects!");
         Con::warnf("FieldBrushObject::pasteFields() - Cannot paste FieldBrushObject objects!");
@@ -575,7 +575,7 @@ void FieldBrushObject::pasteFields( SimObject* pSimObject )
                         staticField.type != AbstractClassRep::DeprecatedFieldType )
                         staticField.type != AbstractClassRep::DeprecatedFieldType )
                 {
                 {
                     // Target field?
                     // Target field?
-                    if ( dStrcmp(staticField.pFieldname, pInternalField) == 0 )
+                    if ( String::compare(staticField.pFieldname, pInternalField) == 0 )
                     {
                     {
                         // Yes, so set data.
                         // Yes, so set data.
                         pSimObject->setDataField( staticField.pFieldname, NULL, fieldEntry->value );
                         pSimObject->setDataField( staticField.pFieldname, NULL, fieldEntry->value );

+ 1 - 1
Engine/source/console/fileSystemFunctions.cpp

@@ -463,7 +463,7 @@ DefineEngineFunction(getDirectoryList, String, ( const char* path, S32 depth ),
 {
 {
    // Grab the full path.
    // Grab the full path.
    char fullpath[1024];
    char fullpath[1024];
-   Platform::makeFullPathName(dStrcmp(path, "/") == 0 ? "" : path, fullpath, sizeof(fullpath));
+   Platform::makeFullPathName(String::compare(path, "/") == 0 ? "" : path, fullpath, sizeof(fullpath));
 
 
    //dSprintf(fullpath, 511, "%s/%s", Platform::getWorkingDirectory(), path);
    //dSprintf(fullpath, 511, "%s/%s", Platform::getWorkingDirectory(), path);
 
 

+ 11 - 11
Engine/source/console/persistenceManager.cpp

@@ -890,10 +890,10 @@ PersistenceManager::ParsedObject* PersistenceManager::findParsedObject(SimObject
          {
          {
             const ParsedProperty &prop = testObj->properties[j];
             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;
                return testObj;
-            else if ( dStrcmp(prop.name, "internalName") == 0)
+            else if ( String::compare(prop.name, "internalName") == 0)
                break;
                break;
          }
          }
       }
       }
@@ -1544,7 +1544,7 @@ void PersistenceManager::updateObject(SimObject* object, ParsedObject* parentObj
          if( object->getCopySource() )
          if( object->getCopySource() )
          {
          {
             const char* copySourceFieldValue = object->getCopySource()->getDataField( entry->slotName, NULL );
             const char* copySourceFieldValue = object->getCopySource()->getDataField( entry->slotName, NULL );
-            if( dStrcmp( copySourceFieldValue, entry->value ) == 0 )
+            if( String::compare( copySourceFieldValue, entry->value ) == 0 )
             {
             {
                removeField( prop );
                removeField( prop );
                continue;
                continue;
@@ -1576,7 +1576,7 @@ void PersistenceManager::updateObject(SimObject* object, ParsedObject* parentObj
          if( object->getCopySource() )
          if( object->getCopySource() )
          {
          {
             const char* copySourceFieldValue = object->getCopySource()->getDataField( entry->slotName, NULL );
             const char* copySourceFieldValue = object->getCopySource()->getDataField( entry->slotName, NULL );
-            if( dStrcmp( copySourceFieldValue, entry->value ) == 0 )
+            if( String::compare( copySourceFieldValue, entry->value ) == 0 )
                continue;
                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).")
               "Mark an existing SimObject as dirty (will be written out when saveDirty() is called).")
 {
 {
    SimObject *dirtyObject = NULL;
    SimObject *dirtyObject = NULL;
-   if (dStrcmp(objName,"") != 0)
+   if (String::compare(objName,"") != 0)
    {
    {
       if (!Sim::findObject(objName, dirtyObject))
       if (!Sim::findObject(objName, dirtyObject))
       {
       {
@@ -2219,7 +2219,7 @@ DefineEngineMethod( PersistenceManager, setDirty, void,  ( const char * objName,
 
 
    if (dirtyObject)
    if (dirtyObject)
    {
    {
-      if (dStrcmp( fileName,"")!=0)
+      if (String::compare( fileName,"")!=0)
          object->setDirty(dirtyObject, fileName);
          object->setDirty(dirtyObject, fileName);
       else
       else
          object->setDirty(dirtyObject);
          object->setDirty(dirtyObject);
@@ -2230,7 +2230,7 @@ DefineEngineMethod( PersistenceManager, removeDirty, void, ( const char * objNam
               "Remove a SimObject from the dirty list.")
               "Remove a SimObject from the dirty list.")
 {
 {
    SimObject *dirtyObject = NULL;
    SimObject *dirtyObject = NULL;
-   if (dStrcmp(  objName,"")!=0)
+	if (String::compare(  objName,"")!=0)
    {
    {
       if (!Sim::findObject(objName, dirtyObject))
       if (!Sim::findObject(objName, dirtyObject))
       {
       {
@@ -2364,7 +2364,7 @@ DefineEngineMethod( PersistenceManager, removeObjectFromFile, void, (const char
 
 
    if (dirtyObject)
    if (dirtyObject)
    {
    {
-      if (dStrcmp( filename,"")!=0)
+      if (String::compare( filename,"")!=0)
          object->removeObjectFromFile(dirtyObject, filename);
          object->removeObjectFromFile(dirtyObject, filename);
       else
       else
          object->removeObjectFromFile(dirtyObject);
          object->removeObjectFromFile(dirtyObject);
@@ -2375,7 +2375,7 @@ DefineEngineMethod( PersistenceManager, removeField, void, (const char * objName
               "Remove a specific field from an object declaration.")
               "Remove a specific field from an object declaration.")
 {
 {
    SimObject *dirtyObject = NULL;
    SimObject *dirtyObject = NULL;
-   if (dStrcmp(objName,"")!=0)
+   if (String::compare(objName,"")!=0)
    {
    {
       if (!Sim::findObject(objName, dirtyObject))
       if (!Sim::findObject(objName, dirtyObject))
       {
       {
@@ -2386,7 +2386,7 @@ DefineEngineMethod( PersistenceManager, removeField, void, (const char * objName
 
 
    if (dirtyObject)
    if (dirtyObject)
    {
    {
-      if (dStrcmp(fieldName,"") != 0)
+      if (String::compare(fieldName,"") != 0)
          object->addRemoveField(dirtyObject, fieldName);
          object->addRemoveField(dirtyObject, fieldName);
    }
    }
 }
 }

+ 1 - 1
Engine/source/console/sim.cpp

@@ -97,7 +97,7 @@ DefineEngineFunction( nameToID, S32, (const char * objectName), ,"nameToID(objec
 
 
 DefineEngineFunction( isObject, bool, (const char * objectName), ,"isObject(object)")
 DefineEngineFunction( isObject, bool, (const char * objectName), ,"isObject(object)")
 {
 {
-   if (!dStrcmp(objectName, "0") || !dStrcmp(objectName, ""))
+   if (!String::compare(objectName, "0") || !String::compare(objectName, ""))
       return false;
       return false;
    else
    else
       return (Sim::findObject(objectName) != NULL);
       return (Sim::findObject(objectName) != NULL);

+ 2 - 2
Engine/source/console/simObject.cpp

@@ -421,7 +421,7 @@ bool SimObject::save(const char *pcFileName, bool bOnlySelected, const char *pre
    while(!f.isEOF())
    while(!f.isEOF())
    {
    {
       buffer = (const char *) f.readLine();
       buffer = (const char *) f.readLine();
-      if(!dStrcmp(buffer, beginMessage))
+      if(!String::compare(buffer, beginMessage))
          break;
          break;
       stream->write(dStrlen(buffer), buffer);
       stream->write(dStrlen(buffer), buffer);
       stream->write(2, "\r\n");
       stream->write(2, "\r\n");
@@ -436,7 +436,7 @@ bool SimObject::save(const char *pcFileName, bool bOnlySelected, const char *pre
    while(!f.isEOF())
    while(!f.isEOF())
    {
    {
       buffer = (const char *) f.readLine();
       buffer = (const char *) f.readLine();
-      if(!dStrcmp(buffer, endMessage))
+      if(!String::compare(buffer, endMessage))
          break;
          break;
    }
    }
    while(!f.isEOF())
    while(!f.isEOF())

+ 1 - 1
Engine/source/core/fileObject.cpp

@@ -493,7 +493,7 @@ DefineEngineMethod( FileObject, writeObject, void,  (const char * simName, const
       Con::printf("FileObject::writeObject - Invalid Object!");
       Con::printf("FileObject::writeObject - Invalid Object!");
       return;
       return;
    }
    }
-	if (!dStrcmp(objName,""))
+	if (!String::compare(objName,""))
        objName = NULL;
        objName = NULL;
 
 
    object->writeObject( obj, (const U8*)objName );
    object->writeObject( obj, (const U8*)objName );

+ 2 - 2
Engine/source/core/stringTable.cpp

@@ -134,7 +134,7 @@ StringTableEntry _StringTable::insert(const char* _val, const bool caseSens)
    U32 key = hashString(val);
    U32 key = hashString(val);
    walk = &buckets[key % numBuckets];
    walk = &buckets[key % numBuckets];
    while((temp = *walk) != NULL)   {
    while((temp = *walk) != NULL)   {
-      if(caseSens && !dStrcmp(temp->val, val))
+      if(caseSens && !String::compare(temp->val, val))
          return temp->val;
          return temp->val;
       else if(!caseSens && !dStricmp(temp->val, val))
       else if(!caseSens && !dStricmp(temp->val, val))
          return temp->val;
          return temp->val;
@@ -175,7 +175,7 @@ StringTableEntry _StringTable::lookup(const char* val, const bool  caseSens)
    U32 key = hashString(val);
    U32 key = hashString(val);
    walk = &buckets[key % numBuckets];
    walk = &buckets[key % numBuckets];
    while((temp = *walk) != NULL)   {
    while((temp = *walk) != NULL)   {
-      if(caseSens && !dStrcmp(temp->val, val))
+      if(caseSens && !String::compare(temp->val, val))
             return temp->val;
             return temp->val;
       else if(!caseSens && !dStricmp(temp->val, val))
       else if(!caseSens && !dStricmp(temp->val, val))
          return temp->val;
          return temp->val;

+ 1 - 1
Engine/source/core/stringTable.h

@@ -59,7 +59,7 @@
 /// pointer mapped to it. As a pointer is an integer value (usually an unsigned int),
 /// pointer mapped to it. As a pointer is an integer value (usually an unsigned int),
 /// so we can do several neat things:
 /// so we can do several neat things:
 ///      - StringTableEntrys can be compared directly for equality, instead of using
 ///      - StringTableEntrys can be compared directly for equality, instead of using
-///        the time-consuming dStrcmp() or dStricmp() function.
+///        the time-consuming String::compare() or dStricmp() function.
 ///      - For things like object names, we can avoid storing multiple copies of the
 ///      - For things like object names, we can avoid storing multiple copies of the
 ///        string containing the name. The StringTable ensures that we only ever store
 ///        string containing the name. The StringTable ensures that we only ever store
 ///        one copy.
 ///        one copy.

+ 2 - 2
Engine/source/core/strings/stringFunctions.cpp

@@ -329,7 +329,7 @@ char* dStrcpyl(char *dst, dsize_t dstSize, ...)
 }
 }
 
 
 
 
-S32 dStrcmp( const UTF16 *str1, const UTF16 *str2)
+S32 dStrcmp(const UTF16 *str1, const UTF16 *str2)
 {
 {
 #if defined(TORQUE_OS_WIN)
 #if defined(TORQUE_OS_WIN)
    return wcscmp( reinterpret_cast<const wchar_t *>( str1 ), reinterpret_cast<const wchar_t *>( str2 ) );
    return wcscmp( reinterpret_cast<const wchar_t *>( str1 ), reinterpret_cast<const wchar_t *>( str2 ) );
@@ -546,7 +546,7 @@ bool dStrEqual(const char* str1, const char* str2)
    if (!str1 || !str2)
    if (!str1 || !str2)
       return false;
       return false;
    else
    else
-      return (dStrcmp(str1, str2) == 0);
+      return (String::compare(str1, str2) == 0);
 }
 }
 
 
 /// Check if one string starts with another
 /// Check if one string starts with another

+ 23 - 1
Engine/source/core/util/str.cpp

@@ -439,7 +439,7 @@ namespace KeyCmp
    template<>
    template<>
    inline bool equals<>( String::StringData* const& d1, String::StringData* const& d2 )
    inline bool equals<>( String::StringData* const& d1, String::StringData* const& d2 )
    {
    {
-      return ( dStrcmp( d1->utf8(), d2->utf8() ) == 0 );
+      return ( String::compare( d1->utf8(), d2->utf8() ) == 0 );
    }
    }
 }
 }
 
 
@@ -1029,6 +1029,28 @@ S32 String::compare(const String &str, SizeType len, U32 mode) const
    return compare( str.c_str(), len, mode );
    return compare( str.c_str(), len, mode );
 }
 }
 
 
+S32 String::compare(const char *str1, const char *str2)
+{
+   return strcmp(str1, str2);
+}
+
+S32 String::compare(const UTF16 *str1, const UTF16 *str2)
+{
+#if defined(TORQUE_OS_WIN) || defined(TORQUE_OS_XBOX) || defined(TORQUE_OS_XENON)
+   return wcscmp(reinterpret_cast<const wchar_t *>(str1), reinterpret_cast<const wchar_t *>(str2));
+#else
+   S32 ret;
+   const UTF16 *a, *b;
+   a = str1;
+   b = str2;
+
+   while (((ret = *a - *b) == 0) && *a && *b)
+      a++, b++;
+
+   return ret;
+#endif
+}
+
 bool String::equal(const String &str, U32 mode) const
 bool String::equal(const String &str, U32 mode) const
 {
 {
    if( !mode )
    if( !mode )

+ 2 - 0
Engine/source/core/util/str.h

@@ -103,6 +103,8 @@ public:
    */
    */
    S32 compare(const StringChar *str, SizeType len = 0, U32 mode = Case|Left) const;
    S32 compare(const StringChar *str, SizeType len = 0, U32 mode = Case|Left) const;
    S32 compare(const String &str, SizeType len = 0, U32 mode = Case|Left) const; ///< @see compare(const StringChar *, SizeType, U32) const
    S32 compare(const String &str, SizeType len = 0, U32 mode = Case|Left) const; ///< @see compare(const StringChar *, SizeType, U32) const
+   static S32 compare(const char *str1, const char *str2);
+   static S32 compare(const UTF16 *str1, const UTF16 *str2);
 
 
    /**
    /**
       Compare two strings for equality.
       Compare two strings for equality.

+ 1 - 1
Engine/source/core/util/tDictionary.h

@@ -142,7 +142,7 @@ namespace KeyCmp
    template<>
    template<>
    inline bool equals<>( const char * const &keya, const char * const &keyb )
    inline bool equals<>( const char * const &keya, const char * const &keyb )
    {
    {
-      return ( dStrcmp( keya, keyb ) == 0 );
+      return ( String::compare( keya, keyb ) == 0 );
    }
    }
 };
 };
 
 

+ 2 - 2
Engine/source/core/util/test/strTest.cpp

@@ -103,8 +103,8 @@ TEST_FIX(Str, Test1)
       EXPECT_TRUE( !data.mData || dMemcmp( str.utf16(), data.mUTF16, str.length() * sizeof( UTF16 ) ) == 0 );
       EXPECT_TRUE( !data.mData || dMemcmp( str.utf16(), data.mUTF16, str.length() * sizeof( UTF16 ) ) == 0 );
       EXPECT_TRUE( !data.mData || dMemcmp( str16.utf8(), data.mData, str.length() ) == 0 );
       EXPECT_TRUE( !data.mData || dMemcmp( str16.utf8(), data.mData, str.length() ) == 0 );
 
 
-      EXPECT_TRUE( !data.mData || dStrcmp( str.utf8(), data.mData ) == 0 );
-      EXPECT_TRUE( !data.mData || dStrcmp( str.utf16(), data.mUTF16 ) == 0 );
+      EXPECT_TRUE( !data.mData || String::compare( str.utf8(), data.mData ) == 0 );
+      EXPECT_TRUE( !data.mData || String::compare( str.utf16(), data.mUTF16 ) == 0 );
    }
    }
 }
 }
 
 

+ 1 - 1
Engine/source/environment/editors/guiRiverEditorCtrl.cpp

@@ -1457,7 +1457,7 @@ DefineEngineMethod( GuiRiverEditorCtrl, setNodeNormal, void, (Point3F normal), ,
 
 
 DefineEngineMethod( GuiRiverEditorCtrl, setSelectedRiver, void, (const char * objName), (""), "" )
 DefineEngineMethod( GuiRiverEditorCtrl, setSelectedRiver, void, (const char * objName), (""), "" )
 {
 {
-   if (dStrcmp( objName,"" )==0)
+   if (String::compare( objName,"" )==0)
       object->setSelectedRiver(NULL);
       object->setSelectedRiver(NULL);
    else
    else
    {
    {

+ 1 - 1
Engine/source/environment/editors/guiRoadEditorCtrl.cpp

@@ -1080,7 +1080,7 @@ DefineEngineMethod( GuiRoadEditorCtrl, setNodePosition, void, ( Point3F pos ), ,
 
 
 DefineEngineMethod( GuiRoadEditorCtrl, setSelectedRoad, void, ( const char * pathRoad ), (""), "" )
 DefineEngineMethod( GuiRoadEditorCtrl, setSelectedRoad, void, ( const char * pathRoad ), (""), "" )
 {
 {
-   if (dStrcmp( pathRoad,"")==0 )
+   if (String::compare( pathRoad,"")==0 )
       object->setSelectedRoad(NULL);
       object->setSelectedRoad(NULL);
    else
    else
    {
    {

+ 2 - 2
Engine/source/gui/controls/guiFileTreeCtrl.cpp

@@ -315,7 +315,7 @@ void GuiFileTreeCtrl::recurseInsert( Item* parent, StringTableEntry path )
    {
    {
       bool allowed = (_isDirInMainDotCsPath(value) || matchesFilters(value));
       bool allowed = (_isDirInMainDotCsPath(value) || matchesFilters(value));
       Item *exists = parent->findChildByValue( szValue );
       Item *exists = parent->findChildByValue( szValue );
-      if( allowed && !exists && dStrcmp( curPos, "" ) != 0 )
+      if( allowed && !exists && String::compare( curPos, "" ) != 0 )
       {
       {
          // Since we're adding a child this parent can't be a virtual parent, so clear that flag
          // Since we're adding a child this parent can't be a virtual parent, so clear that flag
          parent->setVirtualParent( false );
          parent->setVirtualParent( false );
@@ -357,7 +357,7 @@ void GuiFileTreeCtrl::recurseInsert( Item* parent, StringTableEntry path )
    }
    }
    if( delim )
    if( delim )
    {
    {
-      if( ( dStrcmp( delim, "" ) == 0 ) && item )
+      if( ( String::compare( delim, "" ) == 0 ) && item )
       {
       {
          item->setExpanded( false );
          item->setExpanded( false );
          if( parent && _hasChildren( item->getValue() ) )
          if( parent && _hasChildren( item->getValue() ) )

+ 1 - 1
Engine/source/gui/controls/guiGameListOptionsCtrl.cpp

@@ -408,7 +408,7 @@ bool GuiGameListOptionsCtrl::selectOption(S32 rowIndex, const char * theOption)
 
 
    for (Vector<StringTableEntry>::iterator anOption = row->mOptions.begin(); anOption < row->mOptions.end(); ++anOption)
    for (Vector<StringTableEntry>::iterator anOption = row->mOptions.begin(); anOption < row->mOptions.end(); ++anOption)
    {
    {
-      if (dStrcmp(*anOption, theOption) == 0)
+      if (String::compare(*anOption, theOption) == 0)
       {
       {
          S32 newIndex = anOption - row->mOptions.begin();
          S32 newIndex = anOption - row->mOptions.begin();
          row->mSelectedOption = newIndex;
          row->mSelectedOption = newIndex;

+ 4 - 4
Engine/source/gui/controls/guiListBoxCtrl.cpp

@@ -513,7 +513,7 @@ S32 GuiListBoxCtrl::findItemText( StringTableEntry text, bool caseSensitive )
    for( S32 i = 0; i < mItems.size(); i++ )
    for( S32 i = 0; i < mItems.size(); i++ )
    {
    {
       // Case Sensitive Compare?
       // Case Sensitive Compare?
-      if( caseSensitive && ( dStrcmp( mItems[i]->itemText, text ) == 0 ) )
+      if( caseSensitive && ( String::compare( mItems[i]->itemText, text ) == 0 ) )
          return i;
          return i;
       else if (!caseSensitive && ( dStricmp( mItems[i]->itemText, text ) == 0 ))
       else if (!caseSensitive && ( dStricmp( mItems[i]->itemText, text ) == 0 ))
          return i;
          return i;
@@ -1584,7 +1584,7 @@ void GuiListBoxCtrl::addFilteredItem( String item )
    for ( S32 i = 0; i < mSelectedItems.size(); i++ ) 
    for ( S32 i = 0; i < mSelectedItems.size(); i++ ) 
    {
    {
       String itemText = mSelectedItems[i]->itemText;
       String itemText = mSelectedItems[i]->itemText;
-      if ( dStrcmp( itemText.c_str(), item.c_str() ) == 0 ) 
+      if ( String::compare( itemText.c_str(), item.c_str() ) == 0 ) 
       {
       {
          mSelectedItems.erase_fast( i );
          mSelectedItems.erase_fast( i );
          break;
          break;
@@ -1594,7 +1594,7 @@ void GuiListBoxCtrl::addFilteredItem( String item )
    for ( S32 i = 0; i < mItems.size(); i++ ) 
    for ( S32 i = 0; i < mItems.size(); i++ ) 
    {
    {
       String itemText = mItems[i]->itemText;
       String itemText = mItems[i]->itemText;
-      if( dStrcmp( itemText.c_str(), item.c_str() ) == 0 )
+      if( String::compare( itemText.c_str(), item.c_str() ) == 0 )
       {  
       {  
          mItems[i]->isSelected = false;      
          mItems[i]->isSelected = false;      
          mFilteredItems.push_front( mItems[i] );
          mFilteredItems.push_front( mItems[i] );
@@ -1627,7 +1627,7 @@ void GuiListBoxCtrl::removeFilteredItem( String item )
    for ( S32 i = 0; i < mFilteredItems.size(); i++ ) 
    for ( S32 i = 0; i < mFilteredItems.size(); i++ ) 
    {
    {
       String itemText = mFilteredItems[i]->itemText;
       String itemText = mFilteredItems[i]->itemText;
-      if( dStrcmp( itemText.c_str(), item.c_str() ) == 0 )
+      if( String::compare( itemText.c_str(), item.c_str() ) == 0 )
       {        
       {        
          mItems.push_front( mFilteredItems[i] );
          mItems.push_front( mFilteredItems[i] );
          mFilteredItems.erase( &mFilteredItems[i] );
          mFilteredItems.erase( &mFilteredItems[i] );

+ 2 - 2
Engine/source/gui/controls/guiPopUpCtrl.cpp

@@ -629,7 +629,7 @@ void GuiPopUpMenuCtrl::addEntry( const char *buf, S32 id, U32 scheme )
    // Ensure that there are no other entries with exactly the same name
    // Ensure that there are no other entries with exactly the same name
    for ( U32 i = 0; i < mEntries.size(); i++ )
    for ( U32 i = 0; i < mEntries.size(); i++ )
    {
    {
-      if ( dStrcmp( mEntries[i].buf, buf ) == 0 )
+      if ( String::compare( mEntries[i].buf, buf ) == 0 )
          return;
          return;
    }
    }
 
 
@@ -745,7 +745,7 @@ S32 GuiPopUpMenuCtrl::findText( const char* text )
 {
 {
    for ( U32 i = 0; i < mEntries.size(); i++ )
    for ( U32 i = 0; i < mEntries.size(); i++ )
    {
    {
-      if ( dStrcmp( text, mEntries[i].buf ) == 0 )
+      if ( String::compare( text, mEntries[i].buf ) == 0 )
          return( mEntries[i].id );        
          return( mEntries[i].id );        
    }
    }
    return( -1 );
    return( -1 );

+ 2 - 2
Engine/source/gui/controls/guiPopUpCtrlEx.cpp

@@ -832,7 +832,7 @@ void GuiPopUpMenuCtrlEx::addEntry(const char *buf, S32 id, U32 scheme)
    // Ensure that there are no other entries with exactly the same name
    // Ensure that there are no other entries with exactly the same name
    for ( U32 i = 0; i < mEntries.size(); i++ )
    for ( U32 i = 0; i < mEntries.size(); i++ )
    {
    {
-      if ( dStrcmp( mEntries[i].buf, buf ) == 0 )
+      if ( String::compare( mEntries[i].buf, buf ) == 0 )
          return;
          return;
    }
    }
 
 
@@ -930,7 +930,7 @@ S32 GuiPopUpMenuCtrlEx::findText( const char* text )
 {
 {
    for ( U32 i = 0; i < mEntries.size(); i++ )
    for ( U32 i = 0; i < mEntries.size(); i++ )
    {
    {
-      if ( dStrcmp( text, mEntries[i].buf ) == 0 )
+      if ( String::compare( text, mEntries[i].buf ) == 0 )
          return( mEntries[i].id );        
          return( mEntries[i].id );        
    }
    }
    return( -1 );
    return( -1 );

+ 1 - 1
Engine/source/gui/controls/guiTextEditCtrl.cpp

@@ -239,7 +239,7 @@ void GuiTextEditCtrl::updateHistory( StringBuffer *inTxt, bool moveIndex )
       return;
       return;
 
 
    // see if it's already in
    // see if it's already in
-   if(mHistoryLast == -1 || dStrcmp(txt, mHistoryBuf[mHistoryLast]))
+   if(mHistoryLast == -1 || String::compare(txt, mHistoryBuf[mHistoryLast]))
    {
    {
       if(mHistoryLast == mHistorySize-1) // we're at the history limit... shuffle the pointers around:
       if(mHistoryLast == mHistorySize-1) // we're at the history limit... shuffle the pointers around:
       {
       {

+ 3 - 3
Engine/source/gui/controls/guiTreeViewCtrl.cpp

@@ -4372,7 +4372,7 @@ S32 GuiTreeViewCtrl::findItemByName(const char *name)
          continue;
          continue;
       if( mItems[i]->mState.test( Item::InspectorData ) )
       if( mItems[i]->mState.test( Item::InspectorData ) )
          continue;
          continue;
-      if (mItems[i] && dStrcmp(mItems[i]->getText(),name) == 0) 
+      if (mItems[i] && String::compare(mItems[i]->getText(),name) == 0) 
          return mItems[i]->mId;
          return mItems[i]->mId;
    }
    }
 
 
@@ -4389,7 +4389,7 @@ S32 GuiTreeViewCtrl::findItemByValue(const char *name)
          continue;
          continue;
       if( mItems[i]->mState.test( Item::InspectorData ) )
       if( mItems[i]->mState.test( Item::InspectorData ) )
          continue;
          continue;
-      if (mItems[i] && dStrcmp(mItems[i]->getValue(),name) == 0) 
+      if (mItems[i] && String::compare(mItems[i]->getValue(),name) == 0) 
          return mItems[i]->mId;
          return mItems[i]->mId;
    }
    }
 
 
@@ -5330,7 +5330,7 @@ DefineEngineMethod( GuiTreeViewCtrl, getTextToRoot, const char*, (S32 itemId, co
    "@param delimiter (Optional) delimiter to use between each branch concatenation."
    "@param delimiter (Optional) delimiter to use between each branch concatenation."
    "@return text from the current node to the root.")
    "@return text from the current node to the root.")
 {
 {
-   if (!dStrcmp(delimiter, "" ))
+   if (!String::compare(delimiter, "" ))
    {
    {
       Con::warnf("GuiTreeViewCtrl::getTextToRoot - Invalid number of arguments!");
       Con::warnf("GuiTreeViewCtrl::getTextToRoot - Invalid number of arguments!");
       return ("");
       return ("");

+ 1 - 1
Engine/source/gui/core/guiControl.cpp

@@ -692,7 +692,7 @@ bool GuiControl::onAdd()
    const char *cName = getClassName();
    const char *cName = getClassName();
 
 
    // if we're a pure GuiControl, then we're a container by default.
    // if we're a pure GuiControl, then we're a container by default.
-   if ( dStrcmp( "GuiControl", cName ) == 0 )
+   if ( String::compare( "GuiControl", cName ) == 0 )
       mIsContainer = true;
       mIsContainer = true;
 
 
    // Add to root group.
    // Add to root group.

+ 1 - 1
Engine/source/gui/editor/inspector/dynamicField.cpp

@@ -70,7 +70,7 @@ void GuiInspectorDynamicField::setData( const char* data, bool callbacks )
       const char *oldData = target->getDataField( mDynField->slotName, NULL );
       const char *oldData = target->getDataField( mDynField->slotName, NULL );
       if ( !oldData )
       if ( !oldData )
          oldData = "";
          oldData = "";
-      if ( dStrcmp( oldData, data ) != 0 )
+      if ( String::compare( oldData, data ) != 0 )
       {
       {
          target->inspectPreApply();
          target->inspectPreApply();
          
          

+ 1 - 1
Engine/source/gui/editor/inspector/field.cpp

@@ -648,7 +648,7 @@ bool GuiInspectorField::hasSameValueInAllObjects()
       if( !value2 )
       if( !value2 )
          value2 = "";
          value2 = "";
 
 
-      if( dStrcmp( value1, value2 ) != 0 )
+      if( String::compare( value1, value2 ) != 0 )
          return false;
          return false;
    }
    }
          
          

+ 1 - 1
Engine/source/gui/worldEditor/guiConvexShapeEditorCtrl.cpp

@@ -132,7 +132,7 @@ bool GuiConvexEditorCtrl::onWake()
    SimGroup::iterator itr = scene->begin();
    SimGroup::iterator itr = scene->begin();
    for ( ; itr != scene->end(); itr++ )
    for ( ; itr != scene->end(); itr++ )
    {
    {
-      if ( dStrcmp( (*itr)->getClassName(), "ConvexShape" ) == 0 )
+      if ( String::compare( (*itr)->getClassName(), "ConvexShape" ) == 0 )
       {
       {
          mConvexSEL = static_cast<ConvexShape*>( *itr );
          mConvexSEL = static_cast<ConvexShape*>( *itr );
          mGizmo->set( mConvexSEL->getTransform(), mConvexSEL->getPosition(), mConvexSEL->getScale() );
          mGizmo->set( mConvexSEL->getTransform(), mConvexSEL->getPosition(), mConvexSEL->getScale() );

+ 1 - 1
Engine/source/gui/worldEditor/guiDecalEditorCtrl.cpp

@@ -881,7 +881,7 @@ DefineEngineMethod( GuiDecalEditorCtrl, getSelectionCount, S32, (), , "" )
 
 
 DefineEngineMethod( GuiDecalEditorCtrl, retargetDecalDatablock, void, ( const char * dbFrom, const char * dbTo ), , "" )
 DefineEngineMethod( GuiDecalEditorCtrl, retargetDecalDatablock, void, ( const char * dbFrom, const char * dbTo ), , "" )
 {
 {
-   if( dStrcmp( dbFrom, "" ) != 0 && dStrcmp( dbTo, "" ) != 0 )
+   if( String::compare( dbFrom, "" ) != 0 && String::compare( dbTo, "" ) != 0 )
 		object->retargetDecalDatablock( dbFrom, dbTo );
 		object->retargetDecalDatablock( dbFrom, dbTo );
 }
 }
 
 

+ 1 - 1
Engine/source/gui/worldEditor/guiMissionAreaEditor.cpp

@@ -97,7 +97,7 @@ void GuiMissionAreaEditorCtrl::setSelectedMissionArea( MissionArea *missionArea
 
 
 DefineEngineMethod( GuiMissionAreaEditorCtrl, setSelectedMissionArea, void, (const char * missionAreaName), (""), "" )
 DefineEngineMethod( GuiMissionAreaEditorCtrl, setSelectedMissionArea, void, (const char * missionAreaName), (""), "" )
 {
 {
-   if ( dStrcmp( missionAreaName, "" )==0 )
+   if ( String::compare( missionAreaName, "" )==0 )
       object->setSelectedMissionArea(NULL);
       object->setSelectedMissionArea(NULL);
    else
    else
    {
    {

+ 7 - 7
Engine/source/gui/worldEditor/terrainEditor.cpp

@@ -867,7 +867,7 @@ bool TerrainEditor::isMainTile(const GridPoint & gPoint) const
    const S32 blockSize = (S32)gPoint.terrainBlock->getBlockSize();
    const S32 blockSize = (S32)gPoint.terrainBlock->getBlockSize();
 
 
    Point2I testPos = gPoint.gridPos;
    Point2I testPos = gPoint.gridPos;
-   if (!dStrcmp(getCurrentAction(),"paintMaterial"))
+   if (!String::compare(getCurrentAction(),"paintMaterial"))
    {
    {
       if (testPos.x == blockSize)
       if (testPos.x == blockSize)
          testPos.x--;
          testPos.x--;
@@ -1181,7 +1181,7 @@ TerrainBlock* TerrainEditor::collide(const Gui3DMouseEvent & evt, Point3F & pos)
    if (mTerrainBlocks.size() == 0)
    if (mTerrainBlocks.size() == 0)
       return NULL;
       return NULL;
 
 
-   if ( mMouseDown && !dStrcmp(getCurrentAction(),"paintMaterial") )
+   if ( mMouseDown && !String::compare(getCurrentAction(),"paintMaterial") )
    {
    {
       if ( !mActiveTerrain )
       if ( !mActiveTerrain )
          return NULL;
          return NULL;
@@ -1780,7 +1780,7 @@ void TerrainEditor::on3DMouseDown(const Gui3DMouseEvent & event)
    if(mTerrainBlocks.size() == 0)
    if(mTerrainBlocks.size() == 0)
       return;
       return;
 
 
-   if (!dStrcmp(getCurrentAction(),"paintMaterial"))
+   if (!String::compare(getCurrentAction(),"paintMaterial"))
    {
    {
       Point3F pos;
       Point3F pos;
       TerrainBlock* hitTerrain = collide(event, pos);
       TerrainBlock* hitTerrain = collide(event, pos);
@@ -1805,7 +1805,7 @@ void TerrainEditor::on3DMouseDown(const Gui3DMouseEvent & event)
          return;
          return;
       }
       }
    }
    }
-   else if ((event.modifier & SI_ALT) && !dStrcmp(getCurrentAction(),"setHeight"))
+   else if ((event.modifier & SI_ALT) && !String::compare(getCurrentAction(),"setHeight"))
    {
    {
       // Set value to terrain height at mouse position
       // Set value to terrain height at mouse position
       GridInfo info;
       GridInfo info;
@@ -1847,7 +1847,7 @@ void TerrainEditor::on3DMouseMove(const Gui3DMouseEvent & event)
       // We do not change the active terrain as the mouse moves when
       // We do not change the active terrain as the mouse moves when
       // in painting mode.  This is because it causes the material 
       // in painting mode.  This is because it causes the material 
       // window to change as you cursor over to it.
       // window to change as you cursor over to it.
-      if ( dStrcmp(getCurrentAction(),"paintMaterial") != 0 )
+      if ( String::compare(getCurrentAction(),"paintMaterial") != 0 )
       {
       {
          // Set the active terrain
          // Set the active terrain
          bool changed = mActiveTerrain != hitTerrain;
          bool changed = mActiveTerrain != hitTerrain;
@@ -2028,7 +2028,7 @@ void TerrainEditor::getTerrainBlocksMaterialList(Vector<StringTableEntry>& list)
 
 
 void TerrainEditor::setBrushType( const char *type )
 void TerrainEditor::setBrushType( const char *type )
 {
 {
-   if ( mMouseBrush && dStrcmp( mMouseBrush->getType(), type ) == 0 )
+   if ( mMouseBrush && String::compare( mMouseBrush->getType(), type ) == 0 )
       return;
       return;
 
 
    if(!dStricmp(type, "box"))
    if(!dStricmp(type, "box"))
@@ -2199,7 +2199,7 @@ void TerrainEditor::processAction(const char* sAction)
       return;
       return;
 
 
    TerrainAction * action = mCurrentAction;
    TerrainAction * action = mCurrentAction;
-   if (dStrcmp(sAction, "") != 0)
+   if (String::compare(sAction, "") != 0)
    {
    {
       action = lookupAction(sAction);
       action = lookupAction(sAction);
 
 

+ 5 - 5
Engine/source/materials/materialDefinition.cpp

@@ -707,33 +707,33 @@ DefineEngineMethod( Material, getAnimFlags, const char*, (U32 id), , "" )
 
 
    if(object->mAnimFlags[ id ] & Material::Scroll)
    if(object->mAnimFlags[ id ] & Material::Scroll)
    {
    {
-	   if(dStrcmp( animFlags, "" ) == 0)
+	   if(String::compare( animFlags, "" ) == 0)
 	      dStrcpy( animFlags, "$Scroll", 512 );
 	      dStrcpy( animFlags, "$Scroll", 512 );
    }
    }
    if(object->mAnimFlags[ id ] & Material::Rotate)
    if(object->mAnimFlags[ id ] & Material::Rotate)
    {
    {
-	   if(dStrcmp( animFlags, "" ) == 0)
+	   if(String::compare( animFlags, "" ) == 0)
 	      dStrcpy( animFlags, "$Rotate", 512 );
 	      dStrcpy( animFlags, "$Rotate", 512 );
 	   else
 	   else
 			dStrcat( animFlags, " | $Rotate", 512);
 			dStrcat( animFlags, " | $Rotate", 512);
    }
    }
    if(object->mAnimFlags[ id ] & Material::Wave)
    if(object->mAnimFlags[ id ] & Material::Wave)
    {
    {
-	   if(dStrcmp( animFlags, "" ) == 0)
+	   if(String::compare( animFlags, "" ) == 0)
 	      dStrcpy( animFlags, "$Wave", 512 );
 	      dStrcpy( animFlags, "$Wave", 512 );
 	   else
 	   else
 			dStrcat( animFlags, " | $Wave", 512);
 			dStrcat( animFlags, " | $Wave", 512);
    }
    }
    if(object->mAnimFlags[ id ] & Material::Scale)
    if(object->mAnimFlags[ id ] & Material::Scale)
    {
    {
-	   if(dStrcmp( animFlags, "" ) == 0)
+	   if(String::compare( animFlags, "" ) == 0)
 	      dStrcpy( animFlags, "$Scale", 512 );
 	      dStrcpy( animFlags, "$Scale", 512 );
 	   else
 	   else
 			dStrcat( animFlags, " | $Scale", 512);
 			dStrcat( animFlags, " | $Scale", 512);
    }
    }
    if(object->mAnimFlags[ id ] & Material::Sequence)
    if(object->mAnimFlags[ id ] & Material::Sequence)
    {
    {
-	   if(dStrcmp( animFlags, "" ) == 0)
+	   if(String::compare( animFlags, "" ) == 0)
 	      dStrcpy( animFlags, "$Sequence", 512 );
 	      dStrcpy( animFlags, "$Sequence", 512 );
 	   else
 	   else
 			dStrcat( animFlags, " | $Sequence", 512);
 			dStrcat( animFlags, " | $Sequence", 512);

+ 1 - 1
Engine/source/materials/processedShaderMaterial.cpp

@@ -323,7 +323,7 @@ void ProcessedShaderMaterial::_determineFeatures(  U32 stageNum,
 
 
    // TODO: This sort of sucks... BL should somehow force this
    // TODO: This sort of sucks... BL should somehow force this
    // feature on from the outside and not this way.
    // feature on from the outside and not this way.
-   if (dStrcmp(LIGHTMGR->getId(), "BLM") == 0)
+   if (String::compare(LIGHTMGR->getId(), "BLM") == 0)
    {
    {
       fd.features.addFeature(MFT_ForwardShading);
       fd.features.addFeature(MFT_ForwardShading);
       fd.features.addFeature(MFT_ReflectionProbes);
       fd.features.addFeature(MFT_ReflectionProbes);

+ 3 - 3
Engine/source/navigation/navPath.cpp

@@ -136,7 +136,7 @@ bool NavPath::setProtectedFrom(void *obj, const char *index, const char *data)
 {
 {
    NavPath *object = static_cast<NavPath*>(obj);
    NavPath *object = static_cast<NavPath*>(obj);
 
 
-   if(dStrcmp(data, ""))
+   if(String::compare(data, ""))
    {
    {
       object->mFromSet = true;
       object->mFromSet = true;
       return true;
       return true;
@@ -152,7 +152,7 @@ bool NavPath::setProtectedTo(void *obj, const char *index, const char *data)
 {
 {
    NavPath *object = static_cast<NavPath*>(obj);
    NavPath *object = static_cast<NavPath*>(obj);
 
 
-   if(dStrcmp(data, ""))
+   if(String::compare(data, ""))
    {
    {
       object->mToSet = true;
       object->mToSet = true;
       return true;
       return true;
@@ -713,7 +713,7 @@ DefineEngineMethod(NavPath, plan, bool, (),,
 DefineEngineMethod(NavPath, onNavMeshUpdate, void, (const char *data),,
 DefineEngineMethod(NavPath, onNavMeshUpdate, void, (const char *data),,
    "@brief Callback when this path's NavMesh is loaded or rebuilt.")
    "@brief Callback when this path's NavMesh is loaded or rebuilt.")
 {
 {
-   if(object->mMesh && !dStrcmp(data, object->mMesh->getIdString()))
+   if(object->mMesh && !String::compare(data, object->mMesh->getIdString()))
       object->plan();
       object->plan();
 }
 }
 
 

+ 4 - 4
Engine/source/platform/platformFileIO.cpp

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

+ 1 - 1
Engine/source/platform/platformRedBook.cpp

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

+ 2 - 2
Engine/source/platform/profiler.cpp

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

+ 4 - 4
Engine/source/platformWin32/winFileio.cpp

@@ -625,7 +625,7 @@ static bool recurseDumpPath(const char *path, const char *pattern, Vector<Platfo
             continue;
             continue;
 
 
          // skip . and .. directories
          // skip . and .. directories
-         if (dStrcmp( findData.cFileName, TEXT( "." ) ) == 0 || dStrcmp( findData.cFileName, TEXT( ".." ) ) == 0)
+         if (String::compare( findData.cFileName, TEXT( "." ) ) == 0 || String::compare( findData.cFileName, TEXT( ".." ) ) == 0)
             continue;
             continue;
 
 
          // Skip excluded directores
          // Skip excluded directores
@@ -1096,7 +1096,7 @@ bool Platform::isSubDirectory(const char *pParent, const char *pDir)
          //FIXME: this has to be dStrcasecmp but there's no implementation for Unicode
          //FIXME: this has to be dStrcasecmp but there's no implementation for Unicode
 
 
          // and the names match
          // and the names match
-         if (dStrcmp(dir, findData.cFileName ) == 0)
+         if (String::compare(dir, findData.cFileName ) == 0)
          {
          {
             // then we have a real sub directory
             // then we have a real sub directory
             FindClose(handle);
             FindClose(handle);
@@ -1282,7 +1282,7 @@ bool Platform::hasSubDirectory(const char *pPath)
       if (findData.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY)
       if (findData.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY)
       {
       {
          // skip . and .. directories
          // skip . and .. directories
-         if (dStrcmp(findData.cFileName, TEXT( "." ) ) == 0 || dStrcmp(findData.cFileName, TEXT( ".." ) ) == 0)
+         if (String::compare(findData.cFileName, TEXT( "." ) ) == 0 || String::compare(findData.cFileName, TEXT( ".." ) ) == 0)
             continue;
             continue;
 
 
 #ifdef UNICODE
 #ifdef UNICODE
@@ -1417,7 +1417,7 @@ static bool recurseDumpDirectories(const char *basePath, const char *subPath, Ve
       if (findData.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY)
       if (findData.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY)
       {
       {
          // skip . and .. directories
          // skip . and .. directories
-         if (dStrcmp(findData.cFileName, TEXT( "." )) == 0 || dStrcmp(findData.cFileName, TEXT( ".." )) == 0)
+         if (String::compare(findData.cFileName, TEXT( "." )) == 0 || String::compare(findData.cFileName, TEXT( ".." )) == 0)
             continue;
             continue;
 
 
 #ifdef UNICODE
 #ifdef UNICODE

+ 2 - 2
Engine/source/sfx/openal/aldlist.cpp

@@ -61,7 +61,7 @@ ALDeviceList::ALDeviceList( const OPENALFNTABLE &oalft )
       index = 0;
       index = 0;
       // go through device list (each device terminated with a single NULL, list terminated with double NULL)
       // go through device list (each device terminated with a single NULL, list terminated with double NULL)
       while (*devices != 0) {
       while (*devices != 0) {
-         if (dStrcmp(defaultDeviceName, devices) == 0) {
+         if (String::compare(defaultDeviceName, devices) == 0) {
             defaultDeviceIndex = index;
             defaultDeviceIndex = index;
          }
          }
          ALCdevice *device = ALFunction.alcOpenDevice(devices);
          ALCdevice *device = ALFunction.alcOpenDevice(devices);
@@ -73,7 +73,7 @@ ALDeviceList::ALDeviceList( const OPENALFNTABLE &oalft )
                actualDeviceName = ALFunction.alcGetString(device, ALC_DEVICE_SPECIFIER);
                actualDeviceName = ALFunction.alcGetString(device, ALC_DEVICE_SPECIFIER);
                bool bNewName = true;
                bool bNewName = true;
                for (int i = 0; i < GetNumDevices(); i++) {
                for (int i = 0; i < GetNumDevices(); i++) {
-                  if (dStrcmp(GetDeviceName(i), actualDeviceName) == 0) {
+                  if (String::compare(GetDeviceName(i), actualDeviceName) == 0) {
                      bNewName = false;
                      bNewName = false;
                   }
                   }
                }
                }

+ 2 - 2
Engine/source/sfx/sfxSource.cpp

@@ -1576,14 +1576,14 @@ DefineEngineMethod( SFXSource, setTransform, void, ( const char * position, cons
 {
 {
    MatrixF mat = object->getTransform();
    MatrixF mat = object->getTransform();
 
 
-   if(dStrcmp( position , "")!=0 )
+   if(String::compare( position , "")!=0 )
    {
    {
       Point3F pos;
       Point3F pos;
       dSscanf( position, "%g %g %g", &pos.x, &pos.y, &pos.z );
       dSscanf( position, "%g %g %g", &pos.x, &pos.y, &pos.z );
       mat.setPosition( pos );
       mat.setPosition( pos );
    }
    }
    
    
-   if(dStrcmp( direction ,"")!=0 )
+   if(String::compare( direction ,"")!=0 )
    {
    {
       Point3F dir;
       Point3F dir;
       dSscanf( direction, "%g %g %g", &dir.x, &dir.y, &dir.z );
       dSscanf( direction, "%g %g %g", &dir.x, &dir.y, &dir.z );

+ 3 - 3
Engine/source/shaderGen/HLSL/shaderCompHLSL.cpp

@@ -297,19 +297,19 @@ void ParamsDefHLSL::assignConstantNumbers()
             {
             {
                var->constNum = mCurrConst;
                var->constNum = mCurrConst;
                // Increment our constant number based on the variable type
                // Increment our constant number based on the variable type
-               if (dStrcmp((const char*)var->type, "float4x4") == 0)
+               if (String::compare((const char*)var->type, "float4x4") == 0)
                {
                {
                   mCurrConst += (4 * var->arraySize);
                   mCurrConst += (4 * var->arraySize);
                }
                }
                else
                else
                {
                {
-                  if (dStrcmp((const char*)var->type, "float3x3") == 0)
+                  if (String::compare((const char*)var->type, "float3x3") == 0)
                   {
                   {
                      mCurrConst += (3 * var->arraySize);
                      mCurrConst += (3 * var->arraySize);
                   }
                   }
                   else
                   else
                   {
                   {
-                     if (dStrcmp((const char*)var->type, "float4x3") == 0)
+                     if (String::compare((const char*)var->type, "float4x3") == 0)
                      {
                      {
                         mCurrConst += (3 * var->arraySize);
                         mCurrConst += (3 * var->arraySize);
                      }
                      }

+ 5 - 5
Engine/source/shaderGen/HLSL/shaderFeatureHLSL.cpp

@@ -195,14 +195,14 @@ Var * ShaderFeatureHLSL::getVertTexCoord( const String &name )
 
 
    for( U32 i=0; i<LangElement::elementList.size(); i++ )
    for( U32 i=0; i<LangElement::elementList.size(); i++ )
    {
    {
-      if( !dStrcmp( (char*)LangElement::elementList[i]->name, name.c_str() ) )
+      if( !String::compare( (char*)LangElement::elementList[i]->name, name.c_str() ) )
       {
       {
          inTex = dynamic_cast<Var*>( LangElement::elementList[i] );
          inTex = dynamic_cast<Var*>( LangElement::elementList[i] );
          if ( inTex )
          if ( inTex )
          {
          {
             // NOTE: This used to do this check...
             // NOTE: This used to do this check...
             //
             //
-            // dStrcmp( (char*)inTex->structName, "IN" )
+            // String::compare( (char*)inTex->structName, "IN" )
             //
             //
             // ... to ensure that the var was from the input
             // ... to ensure that the var was from the input
             // vertex structure, but this kept some features
             // vertex structure, but this kept some features
@@ -389,7 +389,7 @@ Var* ShaderFeatureHLSL::getOutTexCoord(   const char *name,
       }
       }
    }
    }
 
 
-   AssertFatal( dStrcmp( type, (const char*)texCoord->type ) == 0, 
+   AssertFatal( String::compare( type, (const char*)texCoord->type ) == 0, 
       "ShaderFeatureHLSL::getOutTexCoord - Type mismatch!" );
       "ShaderFeatureHLSL::getOutTexCoord - Type mismatch!" );
 
 
    return texCoord;
    return texCoord;
@@ -409,7 +409,7 @@ Var* ShaderFeatureHLSL::getInTexCoord( const char *name,
       texCoord->setType( type );
       texCoord->setType( type );
    }
    }
 
 
-   AssertFatal( dStrcmp( type, (const char*)texCoord->type ) == 0, 
+   AssertFatal( String::compare( type, (const char*)texCoord->type ) == 0, 
       "ShaderFeatureHLSL::getInTexCoord - Type mismatch!" );
       "ShaderFeatureHLSL::getInTexCoord - Type mismatch!" );
 
 
    return texCoord;
    return texCoord;
@@ -429,7 +429,7 @@ Var* ShaderFeatureHLSL::getInColor( const char *name,
       inColor->setType( type );
       inColor->setType( type );
    }
    }
 
 
-   AssertFatal( dStrcmp( type, (const char*)inColor->type ) == 0, 
+   AssertFatal( String::compare( type, (const char*)inColor->type ) == 0, 
       "ShaderFeatureHLSL::getInColor - Type mismatch!" );
       "ShaderFeatureHLSL::getInColor - Type mismatch!" );
 
 
    return inColor;
    return inColor;

+ 1 - 1
Engine/source/shaderGen/langElement.cpp

@@ -48,7 +48,7 @@ LangElement * LangElement::find( const char *name )
 {
 {
    for( U32 i=0; i<elementList.size(); i++ )
    for( U32 i=0; i<elementList.size(); i++ )
    {
    {
-      if( !dStrcmp( (char*)elementList[i]->name, name ) )
+      if( !String::compare( (char*)elementList[i]->name, name ) )
       {
       {
          return elementList[i];
          return elementList[i];
       }
       }

+ 1 - 1
Engine/source/sim/netConnection.cpp

@@ -1141,7 +1141,7 @@ void NetConnection::packString(BitStream *stream, const char *str)
       char buf[16];
       char buf[16];
       S32 num = dAtoi(str);
       S32 num = dAtoi(str);
       dSprintf(buf, sizeof(buf), "%d", num);
       dSprintf(buf, sizeof(buf), "%d", num);
-      if(!dStrcmp(buf, str))
+      if(!String::compare(buf, str))
       {
       {
          stream->writeInt(Integer, 2);
          stream->writeInt(Integer, 2);
          if(stream->writeFlag(num < 0))
          if(stream->writeFlag(num < 0))

+ 1 - 1
Engine/source/sim/netStringTable.cpp

@@ -72,7 +72,7 @@ U32 NetStringTable::addString(const char *string)
    U32 bucket = hash % HashTableSize;
    U32 bucket = hash % HashTableSize;
    for(U32 walk = hashTable[bucket];walk; walk = table[walk].next)
    for(U32 walk = hashTable[bucket];walk; walk = table[walk].next)
    {
    {
-      if(!dStrcmp(table[walk].string, string))
+      if(!String::compare(table[walk].string, string))
       {
       {
          table[walk].refCount++;
          table[walk].refCount++;
          return walk;
          return walk;

+ 1 - 1
Engine/source/terrain/terrCell.cpp

@@ -1073,7 +1073,7 @@ void TerrCell::preloadMaterials()
       material->getReflectMat();
       material->getReflectMat();
 
 
       if (  GFX->getPixelShaderVersion() > 2.0f && 
       if (  GFX->getPixelShaderVersion() > 2.0f && 
-            dStrcmp( LIGHTMGR->getId(), "BLM" ) != 0)
+            String::compare( LIGHTMGR->getId(), "BLM" ) != 0)
          material->getDeferredMat();
          material->getDeferredMat();
    }
    }
 
 

+ 1 - 1
Engine/source/terrain/terrCellMaterial.cpp

@@ -347,7 +347,7 @@ bool TerrainCellMaterial::_createPass( Vector<MaterialInfo*> *materials,
    // TODO: This seems ugly... we should trigger
    // TODO: This seems ugly... we should trigger
    // features like this differently in the future.
    // features like this differently in the future.
    //
    //
-   bool useBLM = dStrcmp( LIGHTMGR->getId(), "BLM" ) == 0;
+   bool useBLM = String::compare( LIGHTMGR->getId(), "BLM" ) == 0;
 
 
    // Do we need to disable normal mapping?
    // Do we need to disable normal mapping?
    const bool disableNormalMaps = MATMGR->getExclusionFeatures().hasFeature( MFT_NormalMap ) || useBLM;
    const bool disableNormalMaps = MATMGR->getExclusionFeatures().hasFeature( MFT_NormalMap ) || useBLM;

+ 1 - 1
Engine/source/ts/collada/colladaExtensions.h

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

+ 1 - 1
Engine/source/ts/collada/colladaUtils.cpp

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

+ 2 - 2
Engine/source/ts/tsShapeConstruct.cpp

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

+ 1 - 1
Engine/source/ts/tsShapeEdit.cpp

@@ -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)
    // Find the parent node (OK for name to be empty => node is at root level)
    S32 parentIndex = -1;
    S32 parentIndex = -1;
-   if (dStrcmp(parentName, ""))
+   if (String::compare(parentName, ""))
    {
    {
       parentIndex = findNode(parentName);
       parentIndex = findNode(parentName);
       if (parentIndex < 0)
       if (parentIndex < 0)

+ 1 - 1
Engine/source/ts/tsShapeInstance.cpp

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

+ 1 - 1
Engine/source/util/messaging/eventManager.cpp

@@ -508,7 +508,7 @@ DefineEngineMethod( EventManager, dumpSubscribers, void, ( const char * listener
               "Print all subscribers to an event to the console.\n"
               "Print all subscribers to an event to the console.\n"
               "@param event The event whose subscribers are to be printed. If this parameter isn't specified, all events will be dumped." )
               "@param event The event whose subscribers are to be printed. If this parameter isn't specified, all events will be dumped." )
 {
 {
-   if (dStrcmp(listenerName, "") != 0)
+   if (String::compare(listenerName, "") != 0)
       object->dumpSubscribers( listenerName );
       object->dumpSubscribers( listenerName );
    else
    else
       object->dumpSubscribers();
       object->dumpSubscribers();

+ 9 - 9
Engine/source/util/settings.cpp

@@ -92,9 +92,9 @@ const UTF8 *Settings::value(const UTF8 *settingName, const UTF8 *defaultValue)
    const UTF8 *storedDefaultValue = getDataField(defaultNameEntry, NULL);
    const UTF8 *storedDefaultValue = getDataField(defaultNameEntry, NULL);
    setModStaticFields(true);
    setModStaticFields(true);
 
 
-   if(dStrcmp(value, "") != 0)
+   if(String::compare(value, "") != 0)
       return value;
       return value;
-   else if(dStrcmp(storedDefaultValue, "") != 0)
+   else if(String::compare(storedDefaultValue, "") != 0)
       return storedDefaultValue;
       return storedDefaultValue;
    else
    else
 	  return defaultValue;
 	  return defaultValue;
@@ -124,9 +124,9 @@ void Settings::remove(const UTF8 *settingName, bool includeDefaults)
         SimFieldDictionary::Entry* fieldEntry = *itr;
         SimFieldDictionary::Entry* fieldEntry = *itr;
 
 
         // is this a field of our current group
         // is this a field of our current group
-        if ( (dStrcmp(nameEntry, "") == 0) || 
-					dStrcmp( nameEntry, fieldEntry->slotName ) == 0 ||
-					(includeDefaults && dStrcmp( nameEntryDefault, fieldEntry->slotName ) == 0) )
+        if ( (String::compare(nameEntry, "") == 0) || 
+					String::compare( nameEntry, fieldEntry->slotName ) == 0 ||
+					(includeDefaults && String::compare( nameEntryDefault, fieldEntry->slotName ) == 0) )
         {
         {
             // Yes, so remove it.
             // Yes, so remove it.
             pFieldDictionary->setFieldValue( fieldEntry->slotName, "" );
             pFieldDictionary->setFieldValue( fieldEntry->slotName, "" );
@@ -297,7 +297,7 @@ void Settings::readLayer(SimXMLDocument *document, String groupStack)
 	  const UTF8 *name = document->attribute("name");
 	  const UTF8 *name = document->attribute("name");
 	  const UTF8 *value = document->getText();
 	  const UTF8 *value = document->getText();
 	  
 	  
-	  if(dStrcmp(type, "Group") == 0)
+	  if(String::compare(type, "Group") == 0)
 	  {
 	  {
 		 String newStack = groupStack;
 		 String newStack = groupStack;
 
 
@@ -306,7 +306,7 @@ void Settings::readLayer(SimXMLDocument *document, String groupStack)
 
 
 		 newStack += name;
 		 newStack += name;
          readLayer(document, newStack);
          readLayer(document, newStack);
-	  } else if(dStrcmp(type, "Setting") == 0)
+	  } else if(String::compare(type, "Setting") == 0)
 	  {
 	  {
 		 String nameString = groupStack;
 		 String nameString = groupStack;
          
          
@@ -678,9 +678,9 @@ DefineEngineMethod(Settings, value, const char*, (const char * settingName, cons
 {
 {
    StringTableEntry fieldName = StringTable->insert( settingName );
    StringTableEntry fieldName = StringTable->insert( settingName );
    
    
-   if (dStrcmp(defaultValue, "") != 0)
+   if (String::compare(defaultValue, "") != 0)
       return object->value( fieldName, defaultValue );
       return object->value( fieldName, defaultValue );
-   else if (dStrcmp(settingName, "") != 0)
+   else if (String::compare(settingName, "") != 0)
       return object->value( fieldName );
       return object->value( fieldName );
 
 
    return "";
    return "";

+ 1 - 1
Engine/source/windowManager/win32/winDispatch.cpp

@@ -391,7 +391,7 @@ static bool _dispatch(HWND hWnd,UINT message,WPARAM wParam,WPARAM lParam)
 
 
 			// FIXME [tom, 5/1/2007] Hard coding this is lame since there's a const in win32Window.cpp
 			// FIXME [tom, 5/1/2007] Hard coding this is lame since there's a const in win32Window.cpp
 			// CodeReview - this fails if there is a second jug app in the arena.
 			// CodeReview - this fails if there is a second jug app in the arena.
-			if (hwnd == NULL || dStrcmp(classBuf, L"TorqueJuggernaughtWindow") != 0)
+			if (hwnd == NULL || String::compare(classBuf, L"TorqueJuggernaughtWindow") != 0)
 			{
 			{
 				// We are being made inactive and the window being made active isn't
 				// We are being made inactive and the window being made active isn't
 				// a jugg window. Thus, we need to deactivate input.
 				// a jugg window. Thus, we need to deactivate input.