prefer standard find() over Find
This commit is contained in:
@@ -96,8 +96,8 @@ bool CodeItem::Load( CString sButtonsNames )
|
|||||||
const Game* pGame = GAMESTATE->GetCurrentGame();
|
const Game* pGame = GAMESTATE->GetCurrentGame();
|
||||||
vector<CString> asButtonNames;
|
vector<CString> asButtonNames;
|
||||||
|
|
||||||
bool bHasAPlus = sButtonsNames.Find( '+' ) != -1;
|
bool bHasAPlus = sButtonsNames.find( '+' ) != string::npos;
|
||||||
bool bHasADash = sButtonsNames.Find( '-' ) != -1;
|
bool bHasADash = sButtonsNames.find( '-' ) != string::npos;
|
||||||
|
|
||||||
if( bHasAPlus )
|
if( bHasAPlus )
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -23,7 +23,7 @@ bool DifficultyIcon::Load( CString sPath )
|
|||||||
Sprite::Load( sPath );
|
Sprite::Load( sPath );
|
||||||
int iStates = GetNumStates();
|
int iStates = GetNumStates();
|
||||||
bool bWarn = iStates != NUM_DIFFICULTIES && iStates != NUM_DIFFICULTIES*2;
|
bool bWarn = iStates != NUM_DIFFICULTIES && iStates != NUM_DIFFICULTIES*2;
|
||||||
if( sPath.Find("_blank") != -1 )
|
if( sPath.find("_blank") != string::npos )
|
||||||
bWarn = false;
|
bWarn = false;
|
||||||
if( bWarn )
|
if( bWarn )
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -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
|
/* If there's no path in the file, the file is in the same directory
|
||||||
* as the song. (This is the preferred configuration.) */
|
* as the song. (This is the preferred configuration.) */
|
||||||
if( sPath.Find('/') == -1 )
|
if( sPath.find('/') == string::npos )
|
||||||
return sSongPath+sPath;
|
return sSongPath+sPath;
|
||||||
|
|
||||||
/* The song contains a path; treat it as relative to the top SM directory. */
|
/* The song contains a path; treat it as relative to the top SM directory. */
|
||||||
|
|||||||
Reference in New Issue
Block a user