From 126d5f4851eb38daab8902514d1c16e1acbee2b5 Mon Sep 17 00:00:00 2001 From: Glenn Maynard Date: Tue, 26 Apr 2005 10:33:12 +0000 Subject: [PATCH] fix SortCoursePointerArrayByAvgDifficulty and SortCoursePointerArrayByNumPlays --- stepmania/src/CourseUtil.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/stepmania/src/CourseUtil.cpp b/stepmania/src/CourseUtil.cpp index 39192ea918..d09115a2f3 100644 --- a/stepmania/src/CourseUtil.cpp +++ b/stepmania/src/CourseUtil.cpp @@ -156,7 +156,7 @@ void CourseUtil::SortCoursePointerArrayByAvgDifficulty( vector &vpCours for(unsigned i = 0; i < vpCoursesInOut.size(); ++i) { const Trail* pTrail = vpCoursesInOut[i]->GetTrail( GAMESTATE->GetCurrentStyle()->m_StepsType ); - course_sort_val[vpCoursesInOut[i]] = pTrail != NULL? (float) pTrail->GetMeter(): 0.0f; + course_sort_val[vpCoursesInOut[i]] = ssprintf("%09.3f", pTrail != NULL? (float) pTrail->GetMeter(): 0.0f); } sort( vpCoursesInOut.begin(), vpCoursesInOut.end(), CompareCoursePointersByTitle ); stable_sort( vpCoursesInOut.begin(), vpCoursesInOut.end(), CompareCoursePointersBySortValueAscending ); @@ -177,7 +177,7 @@ void CourseUtil::SortCoursePointerArrayByNumPlays( vector &vpCoursesInO { ASSERT( pProfile ); for(unsigned i = 0; i < vpCoursesInOut.size(); ++i) - course_sort_val[vpCoursesInOut[i]] = (float) pProfile->GetCourseNumTimesPlayed(vpCoursesInOut[i]); + course_sort_val[vpCoursesInOut[i]] = ssprintf( "%09i", pProfile->GetCourseNumTimesPlayed(vpCoursesInOut[i]) ); stable_sort( vpCoursesInOut.begin(), vpCoursesInOut.end(), bDescending ? CompareCoursePointersBySortValueDescending : CompareCoursePointersBySortValueAscending ); course_sort_val.clear(); }