prefer standard find() over Find

This commit is contained in:
Glenn Maynard
2005-12-21 08:43:44 +00:00
parent dcd1d8f98e
commit 902e2a5701
3 changed files with 4 additions and 4 deletions
+2 -2
View File
@@ -96,8 +96,8 @@ bool CodeItem::Load( CString sButtonsNames )
const Game* pGame = GAMESTATE->GetCurrentGame();
vector<CString> asButtonNames;
bool bHasAPlus = sButtonsNames.Find( '+' ) != -1;
bool bHasADash = sButtonsNames.Find( '-' ) != -1;
bool bHasAPlus = sButtonsNames.find( '+' ) != string::npos;
bool bHasADash = sButtonsNames.find( '-' ) != string::npos;
if( bHasAPlus )
{
+1 -1
View File
@@ -23,7 +23,7 @@ bool DifficultyIcon::Load( CString sPath )
Sprite::Load( sPath );
int iStates = GetNumStates();
bool bWarn = iStates != NUM_DIFFICULTIES && iStates != NUM_DIFFICULTIES*2;
if( sPath.Find("_blank") != -1 )
if( sPath.find("_blank") != string::npos )
bWarn = false;
if( bWarn )
{
+1 -1
View File
@@ -1256,7 +1256,7 @@ CString GetSongAssetPath( CString sPath, const CString &sSongPath )
/* If there's no path in the file, the file is in the same directory
* as the song. (This is the preferred configuration.) */
if( sPath.Find('/') == -1 )
if( sPath.find('/') == string::npos )
return sSongPath+sPath;
/* The song contains a path; treat it as relative to the top SM directory. */