and SORT_GRADE fixes

This commit is contained in:
Glenn Maynard
2004-03-07 07:03:37 +00:00
parent 6923557389
commit 84a38d3bf1
2 changed files with 4 additions and 4 deletions
+1 -1
View File
@@ -532,7 +532,7 @@ void MusicWheel::BuildWheelItemDatas( vector<WheelItemData> &arrayWheelItemDatas
* so don't re-sort for them. */
// /* We're using sections, so use the section name as the top-level
// * sort. */
if( so != SORT_BPM )
if( so != SORT_GRADE && so != SORT_BPM )
SortSongPointerArrayBySectionName(arraySongs, so);
// make WheelItemDatas with sections
+3 -3
View File
@@ -1298,11 +1298,11 @@ void SortSongPointerArrayByBPM( vector<Song*> &arraySongPointers )
void AppendOctal( int n, int digits, CString &out )
{
for( int p = digits; p >= 0; --p )
for( int p = digits-1; p >= 0; --p )
{
const int shift = p*3;
int n2 = (n >> shift) & 0x7;
out.insert( out.begin(), (char) n2 );
out.insert( out.end(), (char) (n2+'0') );
}
}
@@ -1324,7 +1324,7 @@ void SortSongPointerArrayByGrade( vector<Song*> &arraySongPointers )
CString foo;
foo.reserve(256);
for( int g=NUM_GRADES-1; g>GRADE_NO_DATA; g-- )
for( int g=GRADE_TIER_1; g<=GRADE_NO_DATA; ++g )
{
int n = pSong->GetNumNotesWithGrade( (Grade)g );
AppendOctal( n, 3, foo );