add Course::GetAllCachedTrails

This commit is contained in:
Glenn Maynard
2004-08-30 22:15:57 +00:00
parent d9792f2b31
commit 1f1b24b7b1
2 changed files with 10 additions and 0 deletions
+8
View File
@@ -1111,6 +1111,14 @@ bool Course::IsRanking() const
return false; return false;
} }
void Course::GetAllCachedTrails( vector<Trail *> &out )
{
FOREACH_StepsType( st )
FOREACH_ShownCourseDifficulty( cd )
if( m_TrailCacheValid[st][cd] && !m_TrailCacheNull[st][cd] )
out.push_back( &m_TrailCache[st][cd] );
}
/* /*
* (c) 2001-2004 Chris Danford, Glenn Maynard * (c) 2001-2004 Chris Danford, Glenn Maynard
* All rights reserved. * All rights reserved.
+2
View File
@@ -149,6 +149,8 @@ public:
/* Call when a Song or its Steps are deleted/changed. */ /* Call when a Song or its Steps are deleted/changed. */
void Invalidate( Song *pStaleSong ); void Invalidate( Song *pStaleSong );
void GetAllCachedTrails( vector<Trail *> &out );
private: private:
bool GetTrailUnsorted( StepsType st, CourseDifficulty cd, Trail &trail ) const; bool GetTrailUnsorted( StepsType st, CourseDifficulty cd, Trail &trail ) const;
bool GetTrailSorted( StepsType st, CourseDifficulty cd, Trail &trail ) const; bool GetTrailSorted( StepsType st, CourseDifficulty cd, Trail &trail ) const;