Utilize the algorithm approach.
This commit is contained in:
+3
-8
@@ -1594,14 +1594,9 @@ Song *MusicWheel::GetPreferredSelectionForRandomOrPortal()
|
|||||||
if( i < 900 && pSong->IsTutorial() )
|
if( i < 900 && pSong->IsTutorial() )
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
FOREACH( Difficulty, vDifficultiesToRequire, d )
|
isValid = std::none_of(vDifficultiesToRequire.begin(), vDifficultiesToRequire.end(), [&](Difficulty const &d) {
|
||||||
{
|
return !pSong->HasStepsTypeAndDifficulty(st, d);
|
||||||
if( !pSong->HasStepsTypeAndDifficulty(st,*d) )
|
});
|
||||||
{
|
|
||||||
isValid = false;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if (isValid)
|
if (isValid)
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user