From 2b3c2e4db4e3c0faa59d27db27d9337a1c0fd064 Mon Sep 17 00:00:00 2001 From: Glenn Maynard Date: Thu, 19 Jun 2003 06:23:16 +0000 Subject: [PATCH] strings in CompareSongPointersBySortVal --- stepmania/src/Song.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/stepmania/src/Song.cpp b/stepmania/src/Song.cpp index 98f668ca12..eeeef178b7 100644 --- a/stepmania/src/Song.cpp +++ b/stepmania/src/Song.cpp @@ -1315,7 +1315,7 @@ that have all been played 0 times. } /* Actually, just calculating GetNumTimesPlayed within the sort is pretty * slow, so let's precompute it. (This could be generalized with a template.) */ -map song_sort_val; +map song_sort_val; bool CompareSongPointersBySortVal(const Song *pSong1, const Song *pSong2) { @@ -1325,7 +1325,7 @@ bool CompareSongPointersBySortVal(const Song *pSong1, const Song *pSong2) void SortSongPointerArrayByMostPlayed( vector &arraySongPointers ) { for(unsigned i = 0; i < arraySongPointers.size(); ++i) - song_sort_val[arraySongPointers[i]] = arraySongPointers[i]->GetNumTimesPlayed(); + song_sort_val[arraySongPointers[i]] = ssprintf("%9i", arraySongPointers[i]->GetNumTimesPlayed()); stable_sort( arraySongPointers.begin(), arraySongPointers.end(), CompareSongPointersBySortVal ); reverse( arraySongPointers.begin(), arraySongPointers.end() ); song_sort_val.clear();