Handle updating internally

This commit is contained in:
Glenn Maynard
2003-08-04 21:37:07 +00:00
parent 0a9ea01e7f
commit 7e07e7c8de
2 changed files with 4 additions and 3 deletions
+4
View File
@@ -884,6 +884,8 @@ void SortCoursePointerArrayByDifficulty( vector<Course*> &apCourses )
void SortCoursePointerArrayByRanking( vector<Course*> &apCourses )
{
for(unsigned i=0; i<apCourses.size(); i++)
apCourses[i]->UpdateCourseStats();
sort( apCourses.begin(), apCourses.end(), CompareCoursePointersByRanking );
}
@@ -894,6 +896,8 @@ void SortCoursePointerArrayByAvgDifficulty( vector<Course*> &apCourses )
void SortCoursePointerArrayByTotalDifficulty( vector<Course*> &apCourses )
{
for(unsigned i=0; i<apCourses.size(); i++)
apCourses[i]->UpdateCourseStats();
sort( apCourses.begin(), apCourses.end(), CompareCoursePointersByTotalDifficulty );
}
-3
View File
@@ -568,9 +568,6 @@ void MusicWheel::BuildWheelItemDatas( vector<WheelItemData> &arrayWheelItemDatas
if (PREFSMAN->m_iCourseSortOrder != PrefsManager::COURSE_SORT_SONGS)
{
for(i=0; i<apCourses.size(); i++)
apCourses[i]->UpdateCourseStats();
if (PREFSMAN->m_iCourseSortOrder == PrefsManager::COURSE_SORT_METER)
SortCoursePointerArrayByAvgDifficulty( apCourses );