Convert dStrcmp to String::compare for more cases

This commit is contained in:
Lukas Aldershaab 2020-10-04 00:00:01 +02:00
parent c999baf7ed
commit 197a62f6ea
22 changed files with 45 additions and 45 deletions

View file

@ -309,7 +309,7 @@ void VertPixelConnectorGLSL::print( Stream &stream, bool isVerterShader )
U8 output[256];
Var *var = mElementList[i];
if(!dStrcmp((const char*)var->name, "gl_Position"))
if(!String::compare((const char*)var->name, "gl_Position"))
continue;
if(var->arraySize <= 1)
@ -339,7 +339,7 @@ void VertPixelConnectorGLSL::printOnMain( Stream &stream, bool isVerterShader )
U8 output[256];
Var *var = mElementList[i];
if(!dStrcmp((const char*)var->name, "gl_Position"))
if(!String::compare((const char*)var->name, "gl_Position"))
continue;
dSprintf((char*)output, sizeof(output), " %s IN_%s = _%s_;\r\n", var->type, var->name, var->connectName);
@ -415,7 +415,7 @@ void VertPixelConnectorGLSL::printStructDefines( Stream &stream, bool in )
U8 output[256];
Var *var = mElementList[i];
if(!dStrcmp((const char*)var->name, "gl_Position"))
if(!String::compare((const char*)var->name, "gl_Position"))
continue;
if(!in)

View file

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