Simplify, be explicit.
This commit is contained in:
+5
-5
@@ -963,9 +963,9 @@ void SongUtil::GetPlayableStepsTypes( const Song *pSong, set<StepsType> &vOut )
|
|||||||
* stages left to play. */
|
* stages left to play. */
|
||||||
// this being const may have caused some problems... -aj
|
// this being const may have caused some problems... -aj
|
||||||
const vector<StepsType> &vstToShow = CommonMetrics::STEPS_TYPES_TO_SHOW.GetValue();
|
const vector<StepsType> &vstToShow = CommonMetrics::STEPS_TYPES_TO_SHOW.GetValue();
|
||||||
FOREACHS( StepsType, vStepsTypes, st )
|
for (StepsType const &type : vStepsTypes)
|
||||||
{
|
{
|
||||||
bool bShowThisStepsType = find( vstToShow.begin(), vstToShow.end(), *st ) != vstToShow.end();
|
bool bShowThisStepsType = find( vstToShow.begin(), vstToShow.end(), type ) != vstToShow.end();
|
||||||
|
|
||||||
int iNumPlayers = GAMESTATE->GetNumPlayersEnabled();
|
int iNumPlayers = GAMESTATE->GetNumPlayersEnabled();
|
||||||
iNumPlayers = max( iNumPlayers, 1 );
|
iNumPlayers = max( iNumPlayers, 1 );
|
||||||
@@ -975,7 +975,7 @@ void SongUtil::GetPlayableStepsTypes( const Song *pSong, set<StepsType> &vOut )
|
|||||||
GAMESTATE->GetNumStagesMultiplierForSong(pSong);
|
GAMESTATE->GetNumStagesMultiplierForSong(pSong);
|
||||||
|
|
||||||
if( bShowThisStepsType && bEnoughStages )
|
if( bShowThisStepsType && bEnoughStages )
|
||||||
vOut.insert( *st );
|
vOut.insert( type );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -984,8 +984,8 @@ void SongUtil::GetPlayableSteps( const Song *pSong, vector<Steps*> &vOut )
|
|||||||
set<StepsType> vStepsType;
|
set<StepsType> vStepsType;
|
||||||
GetPlayableStepsTypes( pSong, vStepsType );
|
GetPlayableStepsTypes( pSong, vStepsType );
|
||||||
|
|
||||||
FOREACHS( StepsType, vStepsType, st )
|
for (StepsType const &type : vStepsType)
|
||||||
SongUtil::GetSteps( pSong, vOut, *st );
|
SongUtil::GetSteps( pSong, vOut, type );
|
||||||
|
|
||||||
StepsUtil::RemoveLockedSteps( pSong, vOut );
|
StepsUtil::RemoveLockedSteps( pSong, vOut );
|
||||||
StepsUtil::SortNotesArrayByDifficulty( vOut );
|
StepsUtil::SortNotesArrayByDifficulty( vOut );
|
||||||
|
|||||||
Reference in New Issue
Block a user