We have a lot of duplicate, redundant checks between UNLOCKMAN->SongIsLocked
and Song::GetDisplayed/Song::NormallyDisplayed, which leads to inconsistency. Make UnlockManager::SongIsLocked() handle both. Returns a bitfield; most cases only need to test true or false. (Also adds m_bEnabled; not used yet.)
This commit is contained in:
@@ -63,7 +63,7 @@ void EditMenu::GetSongsToShowForGroup( const RString &sGroup, vector<Song*> &vpS
|
||||
for( int i=vpSongsOut.size()-1; i>=0; i-- )
|
||||
{
|
||||
const Song* pSong = vpSongsOut[i];
|
||||
if( UNLOCKMAN->SongIsLocked(pSong) || pSong->IsTutorial() || SONGMAN->WasLoadedFromAdditionalSongs(pSong) )
|
||||
if( !pSong->NormallyDisplayed() || pSong->IsTutorial() || SONGMAN->WasLoadedFromAdditionalSongs(pSong) )
|
||||
vpSongsOut.erase( vpSongsOut.begin()+i );
|
||||
}
|
||||
break;
|
||||
|
||||
Reference in New Issue
Block a user