From 902e2a5701732987e67aa6aecb0213c01b695505 Mon Sep 17 00:00:00 2001 From: Glenn Maynard Date: Wed, 21 Dec 2005 08:43:44 +0000 Subject: [PATCH] prefer standard find() over Find --- stepmania/src/CodeDetector.cpp | 4 ++-- stepmania/src/DifficultyIcon.cpp | 2 +- stepmania/src/Song.cpp | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/stepmania/src/CodeDetector.cpp b/stepmania/src/CodeDetector.cpp index 25c0b63e12..0df90544d8 100644 --- a/stepmania/src/CodeDetector.cpp +++ b/stepmania/src/CodeDetector.cpp @@ -96,8 +96,8 @@ bool CodeItem::Load( CString sButtonsNames ) const Game* pGame = GAMESTATE->GetCurrentGame(); vector 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 ) { diff --git a/stepmania/src/DifficultyIcon.cpp b/stepmania/src/DifficultyIcon.cpp index d03643f110..1c7422612a 100644 --- a/stepmania/src/DifficultyIcon.cpp +++ b/stepmania/src/DifficultyIcon.cpp @@ -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 ) { diff --git a/stepmania/src/Song.cpp b/stepmania/src/Song.cpp index 061826d6de..4bd3570e99 100644 --- a/stepmania/src/Song.cpp +++ b/stepmania/src/Song.cpp @@ -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. */