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

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

View file

@ -297,19 +297,19 @@ void ParamsDefHLSL::assignConstantNumbers()
{
var->constNum = mCurrConst;
// 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);
}
else
{
if (dStrcmp((const char*)var->type, "float3x3") == 0)
if (String::compare((const char*)var->type, "float3x3") == 0)
{
mCurrConst += (3 * var->arraySize);
}
else
{
if (dStrcmp((const char*)var->type, "float4x3") == 0)
if (String::compare((const char*)var->type, "float4x3") == 0)
{
mCurrConst += (3 * var->arraySize);
}

View file

@ -195,14 +195,14 @@ Var * ShaderFeatureHLSL::getVertTexCoord( const String &name )
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] );
if ( inTex )
{
// 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
// 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!" );
return texCoord;
@ -409,7 +409,7 @@ Var* ShaderFeatureHLSL::getInTexCoord( const char *name,
texCoord->setType( type );
}
AssertFatal( dStrcmp( type, (const char*)texCoord->type ) == 0,
AssertFatal( String::compare( type, (const char*)texCoord->type ) == 0,
"ShaderFeatureHLSL::getInTexCoord - Type mismatch!" );
return texCoord;
@ -429,7 +429,7 @@ Var* ShaderFeatureHLSL::getInColor( const char *name,
inColor->setType( type );
}
AssertFatal( dStrcmp( type, (const char*)inColor->type ) == 0,
AssertFatal( String::compare( type, (const char*)inColor->type ) == 0,
"ShaderFeatureHLSL::getInColor - Type mismatch!" );
return inColor;

View file

@ -48,7 +48,7 @@ LangElement * LangElement::find( const char *name )
{
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];
}