diff --git a/stepmania/src/ScreenSelectGroup.cpp b/stepmania/src/ScreenSelectGroup.cpp index 2464919cb8..a6566d9055 100644 --- a/stepmania/src/ScreenSelectGroup.cpp +++ b/stepmania/src/ScreenSelectGroup.cpp @@ -79,21 +79,18 @@ ScreenSelectGroup::ScreenSelectGroup() aAllSongs.RemoveAt( i ); } - // Get group names by thowing them into a hash - CMapStringToString mapGroupToNothing; - for( i=0; im_sGroupName ] = ""; - CStringArray asGroupNames; - - // Read group names back out into asGroupNames - for( POSITION pos = mapGroupToNothing.GetStartPosition(); pos != NULL; ) - { - CString sGroupName, sValue; - mapGroupToNothing.GetNextAssoc( pos, sGroupName, sValue ); - asGroupNames.Add( sGroupName ); + for( i=0; im_sGroupName ); } - SortCStringArray( asGroupNames, true ); + + /* Remove duplicate groups. */ + SortCStringArray(asGroupNames, true); + for( i=asGroupNames.GetSize()-1; i > 0; --i ) { + if( asGroupNames[i] == asGroupNames[i-1] ) + asGroupNames.RemoveAt( i ); + } + asGroupNames.InsertAt(0, "ALL MUSIC" ); // Add songs to the MusicList.