prefer standard find() over Find
This commit is contained in:
@@ -103,17 +103,17 @@ bool KSFLoader::LoadFromKSFFile( const CString &sPath, Steps &out, const Song &s
|
||||
sFName.MakeLower();
|
||||
|
||||
out.SetDescription(sFName);
|
||||
if( sFName.Find("crazy")!=-1 )
|
||||
if( sFName.find("crazy") != string::npos )
|
||||
{
|
||||
out.SetDifficulty(DIFFICULTY_HARD);
|
||||
if(!out.GetMeter()) out.SetMeter(8);
|
||||
}
|
||||
else if( sFName.Find("hard")!=-1 )
|
||||
else if( sFName.find("hard") != string::npos )
|
||||
{
|
||||
out.SetDifficulty(DIFFICULTY_MEDIUM);
|
||||
if(!out.GetMeter()) out.SetMeter(5);
|
||||
}
|
||||
else if( sFName.Find("easy")!=-1 )
|
||||
else if( sFName.find("easy") != string::npos )
|
||||
{
|
||||
out.SetDifficulty(DIFFICULTY_EASY);
|
||||
if(!out.GetMeter()) out.SetMeter(2);
|
||||
@@ -127,13 +127,13 @@ bool KSFLoader::LoadFromKSFFile( const CString &sPath, Steps &out, const Song &s
|
||||
out.m_StepsType = STEPS_TYPE_PUMP_SINGLE;
|
||||
|
||||
/* Check for "halfdouble" before "double". */
|
||||
if( sFName.Find("halfdouble") != -1 || sFName.Find("h_double") != -1 )
|
||||
if( sFName.find("halfdouble") != -1 || sFName.find("h_double") != string::npos )
|
||||
out.m_StepsType = STEPS_TYPE_PUMP_HALFDOUBLE;
|
||||
else if( sFName.Find("double") != -1 )
|
||||
else if( sFName.find("double") != string::npos )
|
||||
out.m_StepsType = STEPS_TYPE_PUMP_DOUBLE;
|
||||
else if( sFName.Find("_1") != -1 )
|
||||
else if( sFName.find("_1") != string::npos )
|
||||
out.m_StepsType = STEPS_TYPE_PUMP_SINGLE;
|
||||
else if( sFName.Find("_2") != -1 )
|
||||
else if( sFName.find("_2") != string::npos )
|
||||
out.m_StepsType = STEPS_TYPE_PUMP_COUPLE;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user