return NULL -> return CString() for clarity and efficiency

This commit is contained in:
Chris Danford
2005-09-04 16:55:21 +00:00
parent c414d1bcf8
commit 48ebc53549
55 changed files with 107 additions and 107 deletions
+4 -4
View File
@@ -54,20 +54,20 @@ CString RageDisplay::SetVideoMode( VideoModeParams p, bool &bNeedReloadTextures
CString err;
err = this->TryVideoMode(p,bNeedReloadTextures);
if( err == "" )
return NULL;
return CString();
LOG->Trace( "TryVideoMode failed: %s", err.c_str() );
// fall back
p.windowed = false;
if( this->TryVideoMode(p,bNeedReloadTextures) == "" )
return NULL;
return CString();
p.bpp = 16;
if( this->TryVideoMode(p,bNeedReloadTextures) == "" )
return NULL;
return CString();
p.width = 640;
p.height = 480;
if( this->TryVideoMode(p,bNeedReloadTextures) == "" )
return NULL;
return CString();
return ssprintf( "SetVideoMode failed: %s", err.c_str() );
}