mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-02-13 11:43:49 +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
|
|
@ -508,14 +508,14 @@ void queryMasterServer(U8 flags, const char* gameType, const char* missionType,
|
|||
sActiveFilter.type = ServerFilter::Normal;
|
||||
|
||||
// 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;
|
||||
sActiveFilter.gameType = (char*) dRealloc( sActiveFilter.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;
|
||||
sActiveFilter.missionType = (char*) dRealloc( sActiveFilter.missionType, missionTypeLen );
|
||||
|
|
@ -1855,7 +1855,7 @@ static void handleGamePingResponse( const NetAddress* address, BitStream* stream
|
|||
// Verify the version:
|
||||
char buf[256];
|
||||
stream->readString( buf );
|
||||
if ( dStrcmp( buf, versionString ) != 0 )
|
||||
if ( String::compare( buf, versionString ) != 0 )
|
||||
{
|
||||
// Version is different, so remove it from consideration:
|
||||
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:
|
||||
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;
|
||||
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" ) );
|
||||
if ( temp )
|
||||
*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;
|
||||
si->missionName = (char*) dRealloc( (void*) si->missionName, missionNameLen );
|
||||
|
|
@ -2162,7 +2162,7 @@ static void handleGameInfoResponse( const NetAddress* address, BitStream* stream
|
|||
|
||||
// Get the server info:
|
||||
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;
|
||||
si->infoString = (char*) dRealloc( (void*) si->infoString, infoLen );
|
||||
|
|
@ -2171,7 +2171,7 @@ static void handleGameInfoResponse( const NetAddress* address, BitStream* stream
|
|||
|
||||
// Get the content string:
|
||||
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;
|
||||
si->statusString = (char*) dRealloc( (void*) si->statusString, statusLen );
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue