split UpdateBestAndShuffled()

add SortSongs()
This commit is contained in:
Glenn Maynard
2004-02-27 21:28:15 +00:00
parent 960a4c503d
commit 8c8a5f8460
3 changed files with 14 additions and 3 deletions
+9 -1
View File
@@ -871,7 +871,7 @@ Course *SongManager::FindCourse( CString sName )
return NULL;
}
void SongManager::UpdateBestAndShuffled()
void SongManager::UpdateBest()
{
// update players best
for( int i = 0; i < NUM_PROFILE_SLOTS; ++i )
@@ -882,7 +882,10 @@ void SongManager::UpdateBestAndShuffled()
m_pBestCourses[i] = m_pCourses;
SortCoursePointerArrayByNumPlays( m_pBestCourses[i], (ProfileSlot) i, true );
}
}
void SongManager::UpdateShuffled()
{
// update shuffled
m_pShuffledSongs = m_pSongs;
random_shuffle( m_pShuffledSongs.begin(), m_pShuffledSongs.end() );
@@ -891,6 +894,11 @@ void SongManager::UpdateBestAndShuffled()
random_shuffle( m_pShuffledCourses.begin(), m_pShuffledCourses.end() );
}
void SongManager::SortSongs()
{
SortSongPointerArrayByTitle( m_pSongs );
}
void SongManager::UpdateRankingCourses()
{
/* Updating the ranking courses data is fairly expensive