cleanup, optimize

This commit is contained in:
Glenn Maynard
2003-12-12 03:54:26 +00:00
parent 34f2de2d63
commit 36b61910be
+3 -3
View File
@@ -496,6 +496,7 @@ void MusicWheel::BuildWheelItemDatas( vector<WheelItemData> &arrayWheelItemDatas
// Build an array of WheelItemDatas from the sorted list of Song*'s // Build an array of WheelItemDatas from the sorted list of Song*'s
/////////////////////////////////// ///////////////////////////////////
arrayWheelItemDatas.clear(); // clear out the previous wheel items arrayWheelItemDatas.clear(); // clear out the previous wheel items
arrayWheelItemDatas.reserve( arraySongs.size() );
if( PREFSMAN->m_MusicWheelUsesSections == PrefsManager::NEVER || (so != SORT_TITLE && PREFSMAN->m_MusicWheelUsesSections == PrefsManager::ABC_ONLY )) if( PREFSMAN->m_MusicWheelUsesSections == PrefsManager::NEVER || (so != SORT_TITLE && PREFSMAN->m_MusicWheelUsesSections == PrefsManager::ABC_ONLY ))
bUseSections = false; bUseSections = false;
@@ -589,10 +590,9 @@ void MusicWheel::BuildWheelItemDatas( vector<WheelItemData> &arrayWheelItemDatas
default: ASSERT(0); break; default: ASSERT(0); break;
} }
// default sort order; other songs may alter this if (PREFSMAN->m_iCourseSortOrder == PrefsManager::COURSE_SORT_SONGS)
SortCoursePointerArrayByDifficulty( apCourses ); SortCoursePointerArrayByDifficulty( apCourses );
else
if (PREFSMAN->m_iCourseSortOrder != PrefsManager::COURSE_SORT_SONGS)
{ {
if (PREFSMAN->m_iCourseSortOrder == PrefsManager::COURSE_SORT_METER) if (PREFSMAN->m_iCourseSortOrder == PrefsManager::COURSE_SORT_METER)
SortCoursePointerArrayByAvgDifficulty( apCourses ); SortCoursePointerArrayByAvgDifficulty( apCourses );