Change group map to an unordered_map
This commit is contained in:
+1
-1
@@ -349,7 +349,7 @@ void SongManager::AddGroup( RString sDir, RString sGroupDirName, Group* group )
|
||||
// Add the group to its series if the group has one and if the series exists
|
||||
if( group->GetSeries() != "" )
|
||||
{
|
||||
std::unordered_set<Group*>& series = m_mapSeriesToGroup[group->GetSeries()];
|
||||
std::unordered_set<Group*>& series = m_mapSeriesToGroups[group->GetSeries()];
|
||||
series.insert(group);
|
||||
}
|
||||
//m_sSongGroupBackgroundPaths.push_back( sBackgroundPath );
|
||||
|
||||
+4
-4
@@ -147,8 +147,8 @@ public:
|
||||
void GetPreferredSortSongs( std::vector<Song*> &AddTo ) const;
|
||||
std::map<RString, std::vector<Song*>> GetPreferredSortSongsMap() const { return m_mapPreferredSectionToSongs;};
|
||||
RString SongToPreferredSortSectionName( const Song *pSong ) const;
|
||||
std::map<RString, Group*> GetGroupGroupMap() const { return m_mapNameToGroup;};
|
||||
std::map<RString, std::unordered_set<Group*>> GetSeriesGroupMap() const { return m_mapSeriesToGroup;};
|
||||
std::unordered_map<RString, Group*> GetGroupGroupMap() const { return m_mapNameToGroup;};
|
||||
std::map<RString, std::unordered_set<Group*>> GetSeriesGroupMap() const { return m_mapSeriesToGroups;};
|
||||
Group* GetGroupFromName( const RString &sGroupName ) const;
|
||||
Group* GetGroup( const Song *pSong ) const;
|
||||
std::vector<RString> GetPreferredSortSectionNames() const;
|
||||
@@ -250,8 +250,8 @@ protected:
|
||||
std::vector<RString> m_sSongGroupBannerPaths; // each song group may have a banner associated with it
|
||||
//vector<RString> m_sSongGroupBackgroundPaths; // each song group may have a background associated with it (very rarely)
|
||||
|
||||
std::map<RString, Group*> m_mapNameToGroup;
|
||||
std::map<RString, std::unordered_set<Group*>> m_mapSeriesToGroup;
|
||||
std::unordered_map<RString, Group*> m_mapNameToGroup; // maps a group's name on disk (folder) to a Group object
|
||||
std::map<RString, std::unordered_set<Group*>> m_mapSeriesToGroups;
|
||||
|
||||
struct Comp { bool operator()(const RString& s, const RString &t) const { return CompareRStringsAsc(s,t); } };
|
||||
typedef std::vector<Song*> SongPointerVector;
|
||||
|
||||
Reference in New Issue
Block a user