remove unused popular lists
This commit is contained in:
@@ -343,8 +343,7 @@ void SongManager::FreeSongs()
|
||||
|
||||
m_sSongGroupBannerPaths.clear();
|
||||
|
||||
for( int i = 0; i < NUM_ProfileSlot; ++i )
|
||||
m_pPopularSongs[i].clear();
|
||||
m_pPopularSongs.clear();
|
||||
m_pShuffledSongs.clear();
|
||||
}
|
||||
|
||||
@@ -528,14 +527,14 @@ const vector<Song*> &SongManager::GetSongs( const RString &sGroupName ) const
|
||||
return vEmpty;
|
||||
}
|
||||
|
||||
void SongManager::GetPopularSongs( vector<Song*> &AddTo, const RString &sGroupName, ProfileSlot slot ) const
|
||||
void SongManager::GetPopularSongs( vector<Song*> &AddTo, const RString &sGroupName ) const
|
||||
{
|
||||
if( sGroupName == GROUP_ALL )
|
||||
{
|
||||
AddTo.insert( AddTo.end(), m_pPopularSongs[slot].begin(), m_pPopularSongs[slot].end() );
|
||||
AddTo.insert( AddTo.end(), m_pPopularSongs.begin(), m_pPopularSongs.end() );
|
||||
return;
|
||||
}
|
||||
FOREACH_CONST( Song*, m_pPopularSongs[slot], song )
|
||||
FOREACH_CONST( Song*, m_pPopularSongs, song )
|
||||
{
|
||||
if( (*song)->m_sGroupName == sGroupName )
|
||||
AddTo.push_back( *song );
|
||||
@@ -800,9 +799,8 @@ void SongManager::FreeCourses()
|
||||
delete m_pCourses[i];
|
||||
m_pCourses.clear();
|
||||
|
||||
for( int i = 0; i < NUM_ProfileSlot; ++i )
|
||||
FOREACH_CourseType( ct )
|
||||
m_pPopularCourses[i][ct].clear();
|
||||
FOREACH_CourseType( ct )
|
||||
m_pPopularCourses[ct].clear();
|
||||
m_pShuffledCourses.clear();
|
||||
|
||||
m_mapCourseGroupToInfo.clear();
|
||||
@@ -1285,18 +1283,14 @@ void SongManager::UpdatePopular()
|
||||
CourseUtil::SortCoursePointerArrayByTitle( apBestCourses[ct] );
|
||||
}
|
||||
|
||||
FOREACH_ENUM( ProfileSlot, i )
|
||||
m_pPopularSongs = apBestSongs;
|
||||
SongUtil::SortSongPointerArrayByNumPlays( m_pPopularSongs, ProfileSlot_Machine, true );
|
||||
|
||||
FOREACH_CourseType( ct )
|
||||
{
|
||||
m_pPopularSongs[i] = apBestSongs;
|
||||
|
||||
SongUtil::SortSongPointerArrayByNumPlays( m_pPopularSongs[i], i, true );
|
||||
|
||||
FOREACH_CourseType( ct )
|
||||
{
|
||||
vector<Course*> &vpCourses = m_pPopularCourses[i][ct];
|
||||
vpCourses = apBestCourses[ct];
|
||||
CourseUtil::SortCoursePointerArrayByNumPlays( vpCourses, i, true );
|
||||
}
|
||||
vector<Course*> &vpCourses = m_pPopularCourses[ct];
|
||||
vpCourses = apBestCourses[ct];
|
||||
CourseUtil::SortCoursePointerArrayByNumPlays( vpCourses, ProfileSlot_Machine, true );
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -74,10 +74,10 @@ public:
|
||||
|
||||
// Lookup
|
||||
const vector<Song*> &GetSongs( const RString &sGroupName = GROUP_ALL ) const;
|
||||
void GetPopularSongs( vector<Song*> &AddTo, const RString &sGroupName, ProfileSlot slot=ProfileSlot_Machine ) const;
|
||||
void GetPopularSongs( vector<Song*> &AddTo, const RString &sGroupName ) const;
|
||||
void GetPreferredSortSongs( vector<Song*> &AddTo ) const;
|
||||
const vector<Song*> &GetPopularSongs( ProfileSlot slot=ProfileSlot_Machine ) const { return m_pPopularSongs[slot]; }
|
||||
const vector<Course*> &GetPopularCourses( CourseType ct, ProfileSlot slot=ProfileSlot_Machine ) const { return m_pPopularCourses[slot][ct]; }
|
||||
const vector<Song*> &GetPopularSongs() const { return m_pPopularSongs; }
|
||||
const vector<Course*> &GetPopularCourses( CourseType ct ) const { return m_pPopularCourses[ct]; }
|
||||
Song *FindSong( RString sPath ) const;
|
||||
Song *FindSong( RString sGroup, RString sSong ) const;
|
||||
Course *FindCourse( RString sPath ) const;
|
||||
@@ -131,7 +131,7 @@ protected:
|
||||
int GetNumEditsLoadedFromProfile( ProfileSlot slot ) const;
|
||||
|
||||
vector<Song*> m_pSongs; // all songs that can be played
|
||||
vector<Song*> m_pPopularSongs[NUM_ProfileSlot];
|
||||
vector<Song*> m_pPopularSongs;
|
||||
vector<Song*> m_pShuffledSongs; // used by GetRandomSong
|
||||
typedef vector<Song*> SongPointerVector;
|
||||
vector<SongPointerVector> m_vPreferredSongSort;
|
||||
@@ -142,7 +142,7 @@ protected:
|
||||
map<RString,SongPointerVector,Comp> m_mapSongGroupIndex;
|
||||
|
||||
vector<Course*> m_pCourses;
|
||||
vector<Course*> m_pPopularCourses[NUM_ProfileSlot][NUM_CourseType];
|
||||
vector<Course*> m_pPopularCourses[NUM_CourseType];
|
||||
vector<Course*> m_pShuffledCourses; // used by GetRandomCourse
|
||||
struct CourseGroupInfo
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user