fix blacklist image filenames being case-sensitive

This commit is contained in:
Glenn Maynard
2003-07-29 23:20:33 +00:00
parent d1a11d8f24
commit 3014693618
3 changed files with 6 additions and 5 deletions
+3 -2
View File
@@ -2,6 +2,7 @@
#define NOTES_LOADER_H #define NOTES_LOADER_H
#include "song.h" #include "song.h"
#include "RageUtil.h"
#include <set> #include <set>
typedef int DanceNote; typedef int DanceNote;
@@ -25,11 +26,11 @@ class NotesLoader {
protected: protected:
virtual void GetApplicableFiles( CString sPath, CStringArray &out )=0; virtual void GetApplicableFiles( CString sPath, CStringArray &out )=0;
set<CString> BlacklistedImages; set<istring> BlacklistedImages;
public: public:
virtual ~NotesLoader() { } virtual ~NotesLoader() { }
const set<CString> &GetBlacklistedImages() const { return BlacklistedImages; } const set<istring> &GetBlacklistedImages() const { return BlacklistedImages; }
static void GetMainAndSubTitlesFromFullTitle( const CString sFullTitle, CString &sMainTitleOut, CString &sSubTitleOut ); static void GetMainAndSubTitlesFromFullTitle( const CString sFullTitle, CString &sMainTitleOut, CString &sSubTitleOut );
virtual bool LoadFromDir( CString sPath, Song &out ) = 0; virtual bool LoadFromDir( CString sPath, Song &out ) = 0;
bool Loadable( CString sPath ); bool Loadable( CString sPath );
+1 -1
View File
@@ -484,7 +484,7 @@ bool DWILoader::LoadFromDWIFile( CString sPath, Song &out )
pos = endpos + 1; pos = endpos + 1;
BlacklistedImages.insert( sub ); BlacklistedImages.insert( sub.c_str() );
} }
} }
else else
+2 -2
View File
@@ -336,7 +336,7 @@ NotesLoader *Song::MakeLoader( CString sDir ) const
/* Hack: This should be a parameter to TidyUpData, but I don't want to /* Hack: This should be a parameter to TidyUpData, but I don't want to
* pull in <set> into Song.h, which is heavily used. */ * pull in <set> into Song.h, which is heavily used. */
static set<CString> BlacklistedImages; static set<istring> BlacklistedImages;
bool Song::LoadWithoutCache( CString sDir ) bool Song::LoadWithoutCache( CString sDir )
{ {
@@ -686,7 +686,7 @@ void Song::TidyUpData()
for( i=0; i<arrayImages.size(); i++ ) // foreach image for( i=0; i<arrayImages.size(); i++ ) // foreach image
{ {
// ignore DWI "-char" graphics // ignore DWI "-char" graphics
if( BlacklistedImages.find( arrayImages[i] ) != BlacklistedImages.end() ) if( BlacklistedImages.find( arrayImages[i].c_str() ) != BlacklistedImages.end() )
continue; // skip continue; // skip
// Skip any image that we've already classified // Skip any image that we've already classified