From e0e5d0ca29a0834fec2d9eab68f077dfa5675697 Mon Sep 17 00:00:00 2001 From: Glenn Maynard Date: Fri, 27 Feb 2004 21:29:31 +0000 Subject: [PATCH] call SONGMAN->SortSongs; optimize pSong->GetSteps call --- stepmania/src/MusicWheel.cpp | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/stepmania/src/MusicWheel.cpp b/stepmania/src/MusicWheel.cpp index 281c904575..0ba50507e2 100644 --- a/stepmania/src/MusicWheel.cpp +++ b/stepmania/src/MusicWheel.cpp @@ -187,7 +187,12 @@ void MusicWheel::Load() } /* Update for SORT_MOST_PLAYED. */ - SONGMAN->UpdateBestAndShuffled(); + SONGMAN->UpdateBest(); + + /* Sort SONGMAN's songs by CompareSongPointersByTitle, so we can do other sorts (with + * stable_sort) from its output, and title will be the secondary sort, without having + * to re-sort by title each time. */ + SONGMAN->SortSongs(); RageTimer timer; CString times; @@ -375,7 +380,7 @@ void MusicWheel::GetSongList(vector &arraySongs, SongSortOrder so, CStrin continue; vector arraySteps; - pSong->GetSteps( arraySteps, GAMESTATE->GetCurrentStyleDef()->m_StepsType, DIFFICULTY_INVALID, -1, -1, "" ); + pSong->GetSteps( arraySteps, GAMESTATE->GetCurrentStyleDef()->m_StepsType, DIFFICULTY_INVALID, -1, -1, "", 1 ); if( !arraySteps.empty() ) arraySongs.push_back( pSong );