cache Course::GetCourseInfo results

This commit is contained in:
Glenn Maynard
2003-12-21 02:54:23 +00:00
parent be307e76bd
commit ef6b831ea3
6 changed files with 60 additions and 11 deletions
+7 -2
View File
@@ -567,9 +567,10 @@ void SongManager::FreeCourses()
/* Called periodically to wipe out cached NoteData. This is called when we change
* screens. */
void SongManager::CompressSongs()
void SongManager::Cleanup()
{
for( unsigned i=0; i<m_pSongs.size(); i++ )
unsigned i;
for( i=0; i<m_pSongs.size(); i++ )
{
Song* pSong = m_pSongs[i];
for( unsigned n=0; n<pSong->m_apNotes.size(); n++ )
@@ -578,6 +579,10 @@ void SongManager::CompressSongs()
pNotes->Compress();
}
}
/* Erase cached course info. */
for( i=0; i < m_pCourses.size(); i++ )
m_pCourses[i]->ClearCache();
}
void SongManager::GetAllCourses( vector<Course*> &AddTo, bool bIncludeAutogen )