Handle updating internally
This commit is contained in:
@@ -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 );
|
||||
}
|
||||
|
||||
|
||||
@@ -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 );
|
||||
|
||||
|
||||
Reference in New Issue
Block a user