Don't use istring, just use a comparison object that ignores case.
This commit is contained in:
@@ -222,7 +222,7 @@ void SongManager::LoadStepManiaSongDir( RString sDir, LoadingWindow *ld )
|
|||||||
(sDir+sGroupDirName).c_str() );
|
(sDir+sGroupDirName).c_str() );
|
||||||
int loaded = 0;
|
int loaded = 0;
|
||||||
|
|
||||||
SongPointerVector& index_entry = m_mapSongGroupIndex[istring(sGroupDirName)];
|
SongPointerVector& index_entry = m_mapSongGroupIndex[sGroupDirName];
|
||||||
|
|
||||||
for( unsigned j=0; j< arraySongDirs.size(); ++j ) // for each song dir
|
for( unsigned j=0; j< arraySongDirs.size(); ++j ) // for each song dir
|
||||||
{
|
{
|
||||||
@@ -273,7 +273,7 @@ void SongManager::LoadGroupSymLinks(RString sDir, RString sGroupFolder)
|
|||||||
vector<RString> arraySymLinks;
|
vector<RString> arraySymLinks;
|
||||||
GetDirListing( sDir+sGroupFolder+"/*.include", arraySymLinks, false );
|
GetDirListing( sDir+sGroupFolder+"/*.include", arraySymLinks, false );
|
||||||
SortRStringArray( arraySymLinks );
|
SortRStringArray( arraySymLinks );
|
||||||
SongPointerVector& index_entry = m_mapSongGroupIndex[istring(sGroupFolder)];
|
SongPointerVector& index_entry = m_mapSongGroupIndex[sGroupFolder];
|
||||||
for( unsigned s=0; s< arraySymLinks.size(); s++ ) // for each symlink in this dir, add it in as a song.
|
for( unsigned s=0; s< arraySymLinks.size(); s++ ) // for each symlink in this dir, add it in as a song.
|
||||||
{
|
{
|
||||||
MsdFile msdF;
|
MsdFile msdF;
|
||||||
@@ -526,7 +526,7 @@ const vector<Song*> &SongManager::GetSongs( const RString &sGroupName ) const
|
|||||||
|
|
||||||
if( sGroupName == GROUP_ALL )
|
if( sGroupName == GROUP_ALL )
|
||||||
return m_pSongs;
|
return m_pSongs;
|
||||||
map<istring, SongPointerVector>::const_iterator iter = m_mapSongGroupIndex.find( istring(sGroupName) );
|
map<RString, SongPointerVector, Comp>::const_iterator iter = m_mapSongGroupIndex.find( sGroupName );
|
||||||
if ( iter != m_mapSongGroupIndex.end() )
|
if ( iter != m_mapSongGroupIndex.end() )
|
||||||
return iter->second;
|
return iter->second;
|
||||||
return vEmpty;
|
return vEmpty;
|
||||||
|
|||||||
@@ -139,7 +139,9 @@ protected:
|
|||||||
vector<SongPointerVector> m_vPreferredSongSort;
|
vector<SongPointerVector> m_vPreferredSongSort;
|
||||||
vector<RString> m_sSongGroupNames;
|
vector<RString> m_sSongGroupNames;
|
||||||
vector<RString> m_sSongGroupBannerPaths; // each song group may have a banner associated with it
|
vector<RString> m_sSongGroupBannerPaths; // each song group may have a banner associated with it
|
||||||
map<istring,SongPointerVector> m_mapSongGroupIndex;
|
|
||||||
|
struct Comp { bool operator()(const RString& s, const RString &t) const { return CompareRStringsAsc(s,t); } };
|
||||||
|
map<RString,SongPointerVector,Comp> m_mapSongGroupIndex;
|
||||||
|
|
||||||
vector<Course*> m_pCourses;
|
vector<Course*> m_pCourses;
|
||||||
vector<Course*> m_pPopularCourses[NUM_ProfileSlot][NUM_CourseType];
|
vector<Course*> m_pPopularCourses[NUM_ProfileSlot][NUM_CourseType];
|
||||||
|
|||||||
Reference in New Issue
Block a user