minor optimization: compare if a song is in ranking for UpdateCourseStats if ranking is chosen in prefs
This commit is contained in:
@@ -922,19 +922,24 @@ void Course::UpdateCourseStats()
|
||||
SortOrder_TotalDifficulty = 999999; // large number
|
||||
return;
|
||||
}
|
||||
|
||||
SortOrder_TotalDifficulty += ci[i].pNotes->GetMeter();
|
||||
}
|
||||
|
||||
SortOrder_AvgDifficulty = (float)SortOrder_TotalDifficulty/GetEstimatedNumStages();
|
||||
if (GetEstimatedNumStages() > 7) SortOrder_Ranking = 3;
|
||||
|
||||
CStringArray RankingCourses;
|
||||
// HACK: this function takes a while to execute because of
|
||||
// the ranking portion at the end. Do so only if it is
|
||||
// absolutely necessary.
|
||||
if (PREFSMAN->m_iCourseSortOrder == PrefsManager::COURSE_SORT_RANK)
|
||||
{
|
||||
CStringArray RankingCourses;
|
||||
|
||||
split( THEME->GetMetric("ScreenRanking","CoursesToShow"),",", RankingCourses);
|
||||
split( THEME->GetMetric("ScreenRanking","CoursesToShow"),",", RankingCourses);
|
||||
|
||||
for(i = 0; i < RankingCourses.size(); i++)
|
||||
if (!RankingCourses[i].CompareNoCase(this->m_sPath))
|
||||
SortOrder_Ranking = 1;
|
||||
for(i = 0; i < RankingCourses.size(); i++)
|
||||
if (!RankingCourses[i].CompareNoCase(this->m_sPath))
|
||||
SortOrder_Ranking = 1;
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user