Consistent insensitive string comparisons.

This seems to reduce the need for a #define,
but I need someone on the Windows side to check.
This commit is contained in:
Jason Felds
2011-05-11 16:48:51 -04:00
parent 52f3bdf7a6
commit 750b688de4
17 changed files with 72 additions and 79 deletions
+2 -2
View File
@@ -37,7 +37,7 @@ void AnnouncerManager::GetAnnouncerNames( vector<RString>& AddTo )
// strip out the empty announcer folder // strip out the empty announcer folder
for( int i=AddTo.size()-1; i>=0; i-- ) for( int i=AddTo.size()-1; i>=0; i-- )
if( !stricmp( AddTo[i], EMPTY_ANNOUNCER_NAME ) ) if( !AddTo[i].EqualsNoCase( EMPTY_ANNOUNCER_NAME ) )
AddTo.erase(AddTo.begin()+i, AddTo.begin()+i+1 ); AddTo.erase(AddTo.begin()+i, AddTo.begin()+i+1 );
} }
@@ -49,7 +49,7 @@ bool AnnouncerManager::DoesAnnouncerExist( RString sAnnouncerName )
vector<RString> asAnnouncerNames; vector<RString> asAnnouncerNames;
GetAnnouncerNames( asAnnouncerNames ); GetAnnouncerNames( asAnnouncerNames );
for( unsigned i=0; i<asAnnouncerNames.size(); i++ ) for( unsigned i=0; i<asAnnouncerNames.size(); i++ )
if( 0==stricmp(sAnnouncerName, asAnnouncerNames[i]) ) if( sAnnouncerName.EqualsNoCase(asAnnouncerNames[i]) )
return true; return true;
return false; return false;
} }
+3 -3
View File
@@ -390,15 +390,15 @@ void BGAnimationLayer::LoadFromNode( const XNode* pNode )
// Check for string match first, then do integer match. // Check for string match first, then do integer match.
// "if(StringType(type)==0)" was matching against all string matches. // "if(StringType(type)==0)" was matching against all string matches.
// -Chris // -Chris
if( stricmp(type,"sprite")==0 ) if( type.EqualsNoCase("sprite") )
{ {
m_Type = TYPE_SPRITE; m_Type = TYPE_SPRITE;
} }
else if( stricmp(type,"particles")==0 ) else if( type.EqualsNoCase("particles") )
{ {
m_Type = TYPE_PARTICLES; m_Type = TYPE_PARTICLES;
} }
else if( stricmp(type,"tiles")==0 ) else if( type.EqualsNoCase("tiles") )
{ {
m_Type = TYPE_TILES; m_Type = TYPE_TILES;
} }
+15 -15
View File
@@ -61,13 +61,13 @@ bool CourseLoaderCRS::LoadFromMsd( const RString &sPath, const MsdFile &msd, Cou
const MsdFile::value_t &sParams = msd.GetValue(i); const MsdFile::value_t &sParams = msd.GetValue(i);
// handle the data // handle the data
if( 0 == stricmp(sValueName, "COURSE") ) if( sValueName.EqualsNoCase("COURSE") )
out.m_sMainTitle = sParams[1]; out.m_sMainTitle = sParams[1];
else if( 0 == stricmp(sValueName, "COURSETRANSLIT") ) else if( sValueName.EqualsNoCase("COURSETRANSLIT") )
out.m_sMainTitleTranslit = sParams[1]; out.m_sMainTitleTranslit = sParams[1];
else if( 0 == stricmp(sValueName, "SCRIPTER") ) else if( sValueName.EqualsNoCase("SCRIPTER") )
out.m_sScripter = sParams[1]; out.m_sScripter = sParams[1];
else if( 0 == stricmp(sValueName, "REPEAT") ) else if( sValueName.EqualsNoCase("REPEAT") )
{ {
RString str = sParams[1]; RString str = sParams[1];
str.MakeLower(); str.MakeLower();
@@ -75,23 +75,23 @@ bool CourseLoaderCRS::LoadFromMsd( const RString &sPath, const MsdFile &msd, Cou
out.m_bRepeat = true; out.m_bRepeat = true;
} }
else if( 0 == stricmp(sValueName, "BANNER") ) else if( sValueName.EqualsNoCase("BANNER") )
{ {
out.m_sBannerPath = sParams[1]; out.m_sBannerPath = sParams[1];
} }
else if( 0 == stricmp(sValueName, "BACKGROUND") ) else if( sValueName.EqualsNoCase("BACKGROUND") )
{ {
out.m_sBackgroundPath = sParams[1]; out.m_sBackgroundPath = sParams[1];
} }
else if( 0 == stricmp(sValueName, "LIVES") ) else if( sValueName.EqualsNoCase("LIVES") )
{ {
out.m_iLives = max( StringToInt(sParams[1]), 0 ); out.m_iLives = max( StringToInt(sParams[1]), 0 );
} }
else if( 0 == stricmp(sValueName, "GAINSECONDS") ) else if( sValueName.EqualsNoCase("GAINSECONDS") )
{ {
fGainSeconds = StringToFloat( sParams[1] ); fGainSeconds = StringToFloat( sParams[1] );
} }
else if( 0 == stricmp(sValueName, "METER") ) else if( sValueName.EqualsNoCase("METER") )
{ {
if( sParams.params.size() == 2 ) if( sParams.params.size() == 2 )
{ {
@@ -110,7 +110,7 @@ bool CourseLoaderCRS::LoadFromMsd( const RString &sPath, const MsdFile &msd, Cou
} }
// todo: add COMBO and COMBOMODE from DWI CRS files? -aj // todo: add COMBO and COMBOMODE from DWI CRS files? -aj
else if( 0 == stricmp(sValueName, "MODS") ) else if( sValueName.EqualsNoCase("MODS") )
{ {
Attack attack; Attack attack;
float end = -9999; float end = -9999;
@@ -156,7 +156,7 @@ bool CourseLoaderCRS::LoadFromMsd( const RString &sPath, const MsdFile &msd, Cou
} }
} }
else if( 0 == stricmp(sValueName, "SONG") ) else if( sValueName.EqualsNoCase("SONG") )
{ {
CourseEntry new_entry; CourseEntry new_entry;
@@ -298,13 +298,13 @@ bool CourseLoaderCRS::LoadFromMsd( const RString &sPath, const MsdFile &msd, Cou
out.m_vEntries.push_back( new_entry ); out.m_vEntries.push_back( new_entry );
} }
else if( !stricmp(sValueName, "DISPLAYCOURSE") || !stricmp(sValueName, "COMBO") || else if( !sValueName.EqualsNoCase("DISPLAYCOURSE") || !sValueName.EqualsNoCase("COMBO") ||
!stricmp(sValueName, "COMBOMODE") ) !sValueName.EqualsNoCase("COMBOMODE") )
{ {
// Ignore // Ignore
} }
else if( bFromCache && !stricmp(sValueName, "RADAR") ) else if( bFromCache && !sValueName.EqualsNoCase("RADAR") )
{ {
StepsType st = (StepsType) StringToInt(sParams[1]); StepsType st = (StepsType) StringToInt(sParams[1]);
CourseDifficulty cd = (CourseDifficulty) StringToInt( sParams[2] ); CourseDifficulty cd = (CourseDifficulty) StringToInt( sParams[2] );
@@ -313,7 +313,7 @@ bool CourseLoaderCRS::LoadFromMsd( const RString &sPath, const MsdFile &msd, Cou
rv.FromString( sParams[3] ); rv.FromString( sParams[3] );
out.m_RadarCache[Course::CacheEntry(st, cd)] = rv; out.m_RadarCache[Course::CacheEntry(st, cd)] = rv;
} }
else if( 0 == stricmp(sValueName, "STYLE") ) else if( sValueName.EqualsNoCase("STYLE") )
{ {
RString sStyles = sParams[1]; RString sStyles = sParams[1];
vector<RString> asStyles; vector<RString> asStyles;
+1 -1
View File
@@ -948,7 +948,7 @@ MultiPlayer InputMapper::InputDeviceToMultiPlayer( InputDevice id )
GameButton InputScheme::ButtonNameToIndex( const RString &sButtonName ) const GameButton InputScheme::ButtonNameToIndex( const RString &sButtonName ) const
{ {
for( GameButton gb=(GameButton) 0; gb<m_iButtonsPerController; gb=(GameButton)(gb+1) ) for( GameButton gb=(GameButton) 0; gb<m_iButtonsPerController; gb=(GameButton)(gb+1) )
if( stricmp(GetGameButtonName(gb), sButtonName) == 0 ) if( sButtonName.EqualsNoCase(GetGameButtonName(gb)) )
return gb; return gb;
return GameButton_Invalid; return GameButton_Invalid;
+1 -1
View File
@@ -63,7 +63,7 @@ bool LyricsLoader::LoadFromLRCFile(const RString& sPath, Song& out)
StripCrnl(sValueData); StripCrnl(sValueData);
// handle the data // handle the data
if( 0==stricmp(sValueName,"COLOUR") || 0==stricmp(sValueName,"COLOR") ) if( sValueName.EqualsNoCase("COLOUR") || sValueName.EqualsNoCase("COLOR") )
{ {
// set color var here for this segment // set color var here for this segment
int r, g, b; int r, g, b;
+1 -1
View File
@@ -63,7 +63,7 @@ void ModIcon::Set( const RString &_sText )
}; };
for( unsigned i=0; i<ARRAYLEN(sStopWords); i++ ) for( unsigned i=0; i<ARRAYLEN(sStopWords); i++ )
if( 0==stricmp(sText,sStopWords[i]) ) if( sText.EqualsNoCase(sStopWords[i]) )
sText = ""; sText = "";
sText.Replace( " ", "\n" ); sText.Replace( " ", "\n" );
+1 -1
View File
@@ -199,7 +199,7 @@ bool NoteSkinManager::DoesNoteSkinExist( const RString &sSkinName )
vector<RString> asSkinNames; vector<RString> asSkinNames;
GetAllNoteSkinNamesForGame( GAMESTATE->m_pCurGame, asSkinNames ); GetAllNoteSkinNamesForGame( GAMESTATE->m_pCurGame, asSkinNames );
for( unsigned i=0; i<asSkinNames.size(); i++ ) for( unsigned i=0; i<asSkinNames.size(); i++ )
if( 0==stricmp(sSkinName, asSkinNames[i]) ) if( sSkinName.EqualsNoCase(asSkinNames[i]) )
return true; return true;
return false; return false;
} }
+18 -18
View File
@@ -447,10 +447,10 @@ bool DWILoader::LoadFromDir( const RString &sPath_, Song &out, set<RString> &Bla
} }
// handle the data // handle the data
if( 0==stricmp(sValueName,"FILE") ) if( sValueName.EqualsNoCase("FILE") )
out.m_sMusicFile = sParams[1]; out.m_sMusicFile = sParams[1];
else if( 0==stricmp(sValueName,"TITLE") ) else if( sValueName.EqualsNoCase("TITLE") )
{ {
NotesLoader::GetMainAndSubTitlesFromFullTitle( sParams[1], out.m_sMainTitle, out.m_sSubTitle ); NotesLoader::GetMainAndSubTitlesFromFullTitle( sParams[1], out.m_sMainTitle, out.m_sSubTitle );
@@ -460,22 +460,22 @@ bool DWILoader::LoadFromDir( const RString &sPath_, Song &out, set<RString> &Bla
ConvertString( out.m_sSubTitle, "utf-8,english" ); ConvertString( out.m_sSubTitle, "utf-8,english" );
} }
else if( 0==stricmp(sValueName,"ARTIST") ) else if( sValueName.EqualsNoCase("ARTIST") )
{ {
out.m_sArtist = sParams[1]; out.m_sArtist = sParams[1];
ConvertString( out.m_sArtist, "utf-8,english" ); ConvertString( out.m_sArtist, "utf-8,english" );
} }
else if( 0==stricmp(sValueName,"GENRE") ) else if( sValueName.EqualsNoCase("GENRE") )
{ {
out.m_sGenre = sParams[1]; out.m_sGenre = sParams[1];
ConvertString( out.m_sGenre, "utf-8,english" ); ConvertString( out.m_sGenre, "utf-8,english" );
} }
else if( 0==stricmp(sValueName,"CDTITLE") ) else if( sValueName.EqualsNoCase("CDTITLE") )
out.m_sCDTitleFile = sParams[1]; out.m_sCDTitleFile = sParams[1];
else if( 0==stricmp(sValueName,"BPM") ) else if( sValueName.EqualsNoCase("BPM") )
{ {
const float fBPM = StringToFloat( sParams[1] ); const float fBPM = StringToFloat( sParams[1] );
@@ -491,7 +491,7 @@ bool DWILoader::LoadFromDir( const RString &sPath_, Song &out, set<RString> &Bla
NoteRowToBeat(0), fBPM ); NoteRowToBeat(0), fBPM );
} }
} }
else if( 0==stricmp(sValueName,"DISPLAYBPM") ) else if( sValueName.EqualsNoCase("DISPLAYBPM") )
{ {
// #DISPLAYBPM:[xxx..xxx]|[xxx]|[*]; // #DISPLAYBPM:[xxx..xxx]|[xxx]|[*];
int iMin, iMax; int iMin, iMax;
@@ -515,17 +515,17 @@ bool DWILoader::LoadFromDir( const RString &sPath_, Song &out, set<RString> &Bla
} }
} }
else if( 0==stricmp(sValueName,"GAP") ) else if( sValueName.EqualsNoCase("GAP") )
// the units of GAP is 1/1000 second // the units of GAP is 1/1000 second
out.m_Timing.m_fBeat0OffsetInSeconds = -StringToInt( sParams[1] ) / 1000.0f; out.m_Timing.m_fBeat0OffsetInSeconds = -StringToInt( sParams[1] ) / 1000.0f;
else if( 0==stricmp(sValueName,"SAMPLESTART") ) else if( sValueName.EqualsNoCase("SAMPLESTART") )
out.m_fMusicSampleStartSeconds = ParseBrokenDWITimestamp(sParams[1], sParams[2], sParams[3]); out.m_fMusicSampleStartSeconds = ParseBrokenDWITimestamp(sParams[1], sParams[2], sParams[3]);
else if( 0==stricmp(sValueName,"SAMPLELENGTH") ) else if( sValueName.EqualsNoCase("SAMPLELENGTH") )
out.m_fMusicSampleLengthSeconds = ParseBrokenDWITimestamp(sParams[1], sParams[2], sParams[3]); out.m_fMusicSampleLengthSeconds = ParseBrokenDWITimestamp(sParams[1], sParams[2], sParams[3]);
else if( 0==stricmp(sValueName,"FREEZE") ) else if( sValueName.EqualsNoCase("FREEZE") )
{ {
vector<RString> arrayFreezeExpressions; vector<RString> arrayFreezeExpressions;
split( sParams[1], ",", arrayFreezeExpressions ); split( sParams[1], ",", arrayFreezeExpressions );
@@ -547,7 +547,7 @@ bool DWILoader::LoadFromDir( const RString &sPath_, Song &out, set<RString> &Bla
} }
} }
else if( 0==stricmp(sValueName,"CHANGEBPM") || 0==stricmp(sValueName,"BPMCHANGE") ) else if( sValueName.EqualsNoCase("CHANGEBPM") || sValueName.EqualsNoCase("BPMCHANGE") )
{ {
vector<RString> arrayBPMChangeExpressions; vector<RString> arrayBPMChangeExpressions;
split( sParams[1], ",", arrayBPMChangeExpressions ); split( sParams[1], ",", arrayBPMChangeExpressions );
@@ -577,10 +577,10 @@ bool DWILoader::LoadFromDir( const RString &sPath_, Song &out, set<RString> &Bla
} }
} }
else if( 0==stricmp(sValueName,"SINGLE") || else if( sValueName.EqualsNoCase("SINGLE") ||
0==stricmp(sValueName,"DOUBLE") || sValueName.EqualsNoCase("DOUBLE") ||
0==stricmp(sValueName,"COUPLE") || sValueName.EqualsNoCase("COUPLE") ||
0==stricmp(sValueName,"SOLO") ) sValueName.EqualsNoCase("SOLO") )
{ {
Steps* pNewNotes = new Steps; Steps* pNewNotes = new Steps;
LoadFromDWITokens( LoadFromDWITokens(
@@ -597,8 +597,8 @@ bool DWILoader::LoadFromDir( const RString &sPath_, Song &out, set<RString> &Bla
else else
delete pNewNotes; delete pNewNotes;
} }
else if( 0==stricmp(sValueName,"DISPLAYTITLE") || else if( sValueName.EqualsNoCase("DISPLAYTITLE") ||
0==stricmp(sValueName,"DISPLAYARTIST") ) sValueName.EqualsNoCase("DISPLAYARTIST") )
{ {
/* We don't want to support these tags. However, we don't want /* We don't want to support these tags. However, we don't want
* to pick up images used here as song images (eg. banners). */ * to pick up images used here as song images (eg. banners). */
+2 -2
View File
@@ -143,9 +143,9 @@ static void Deserialize( Song &out, const Json::Value &root )
out.m_fMusicSampleStartSeconds = (float)root["SampleStart"].asDouble(); out.m_fMusicSampleStartSeconds = (float)root["SampleStart"].asDouble();
out.m_fMusicSampleLengthSeconds = (float)root["SampleLength"].asDouble(); out.m_fMusicSampleLengthSeconds = (float)root["SampleLength"].asDouble();
RString sSelectable = root["Selectable"].asString(); RString sSelectable = root["Selectable"].asString();
if( !stricmp(sSelectable,"YES") ) if( sSelectable.EqualsNoCase("YES") )
out.m_SelectionDisplay = out.SHOW_ALWAYS; out.m_SelectionDisplay = out.SHOW_ALWAYS;
else if(!stricmp(sSelectable,"NO")) else if( sSelectable.EqualsNoCase("NO") )
out.m_SelectionDisplay = out.SHOW_NEVER; out.m_SelectionDisplay = out.SHOW_NEVER;
out.m_fFirstBeat = (float)root["FirstBeat"].asDouble(); out.m_fFirstBeat = (float)root["FirstBeat"].asDouble();
+6 -6
View File
@@ -286,12 +286,12 @@ static void LoadTags( const RString &str, Song &out )
split( str, " - ", asBits, false ); split( str, " - ", asBits, false );
// Ignore the difficulty, since we get that elsewhere. // Ignore the difficulty, since we get that elsewhere.
if( asBits.size() == 3 && ( if( asBits.size() == 3 && (
!stricmp(asBits[2], "double") || asBits[2].EqualsNoCase("double") ||
!stricmp(asBits[2], "easy") || asBits[2].EqualsNoCase("easy") ||
!stricmp(asBits[2], "normal") || asBits[2].EqualsNoCase("normal") ||
!stricmp(asBits[2], "hard") || asBits[2].EqualsNoCase("hard") ||
!stricmp(asBits[2], "crazy") || asBits[2].EqualsNoCase("crazy") ||
!stricmp(asBits[2], "nightmare")) asBits[2].EqualsNoCase("nightmare"))
) )
{ {
asBits.erase( asBits.begin()+2, asBits.begin()+3 ); asBits.erase( asBits.begin()+2, asBits.begin()+3 );
+4 -4
View File
@@ -596,18 +596,18 @@ bool SMLoader::LoadFromSMFile( const RString &sPath, Song &out, bool bFromCache
else if( sValueName=="SELECTABLE" ) else if( sValueName=="SELECTABLE" )
{ {
if(!stricmp(sParams[1],"YES")) if(sParams[1].EqualsNoCase("YES"))
out.m_SelectionDisplay = out.SHOW_ALWAYS; out.m_SelectionDisplay = out.SHOW_ALWAYS;
else if(!stricmp(sParams[1],"NO")) else if(sParams[1].EqualsNoCase("NO"))
out.m_SelectionDisplay = out.SHOW_NEVER; out.m_SelectionDisplay = out.SHOW_NEVER;
// ROULETTE from 3.9. It was removed since UnlockManager can serve // ROULETTE from 3.9. It was removed since UnlockManager can serve
// the same purpose somehow. This, of course, assumes you're using // the same purpose somehow. This, of course, assumes you're using
// unlocks. -aj // unlocks. -aj
else if(!stricmp(sParams[1],"ROULETTE")) else if(sParams[1].EqualsNoCase("ROULETTE"))
out.m_SelectionDisplay = out.SHOW_ALWAYS; out.m_SelectionDisplay = out.SHOW_ALWAYS;
/* The following two cases are just fixes to make sure simfiles that /* The following two cases are just fixes to make sure simfiles that
* used 3.9+ features are not excluded here */ * used 3.9+ features are not excluded here */
else if(!stricmp(sParams[1],"ES") || !stricmp(sParams[1],"OMES")) else if(sParams[1].EqualsNoCase("ES") || sParams[1].EqualsNoCase("OMES"))
out.m_SelectionDisplay = out.SHOW_ALWAYS; out.m_SelectionDisplay = out.SHOW_ALWAYS;
else if( StringToInt(sParams[1]) > 0 ) else if( StringToInt(sParams[1]) > 0 )
out.m_SelectionDisplay = out.SHOW_ALWAYS; out.m_SelectionDisplay = out.SHOW_ALWAYS;
+4 -4
View File
@@ -244,18 +244,18 @@ bool SMALoader::LoadFromSMAFile( const RString &sPath, Song &out )
else if( sValueName=="SELECTABLE" ) else if( sValueName=="SELECTABLE" )
{ {
if(!stricmp(sParams[1],"YES")) if(sParams[1].EqualsNoCase("YES"))
out.m_SelectionDisplay = out.SHOW_ALWAYS; out.m_SelectionDisplay = out.SHOW_ALWAYS;
else if(!stricmp(sParams[1],"NO")) else if(sParams[1].EqualsNoCase("NO"))
out.m_SelectionDisplay = out.SHOW_NEVER; out.m_SelectionDisplay = out.SHOW_NEVER;
// ROULETTE from 3.9. It was removed since UnlockManager can serve // ROULETTE from 3.9. It was removed since UnlockManager can serve
// the same purpose somehow. This, of course, assumes you're using // the same purpose somehow. This, of course, assumes you're using
// unlocks. -aj // unlocks. -aj
else if(!stricmp(sParams[1],"ROULETTE")) else if(sParams[1].EqualsNoCase("ROULETTE"))
out.m_SelectionDisplay = out.SHOW_ALWAYS; out.m_SelectionDisplay = out.SHOW_ALWAYS;
/* The following two cases are just fixes to make sure simfiles that /* The following two cases are just fixes to make sure simfiles that
* used 3.9+ features are not excluded here */ * used 3.9+ features are not excluded here */
else if(!stricmp(sParams[1],"ES") || !stricmp(sParams[1],"OMES")) else if(sParams[1].EqualsNoCase("ES") || sParams[1].EqualsNoCase("OMES"))
out.m_SelectionDisplay = out.SHOW_ALWAYS; out.m_SelectionDisplay = out.SHOW_ALWAYS;
else if( StringToInt(sParams[1]) > 0 ) else if( StringToInt(sParams[1]) > 0 )
out.m_SelectionDisplay = out.SHOW_ALWAYS; out.m_SelectionDisplay = out.SHOW_ALWAYS;
+4 -4
View File
@@ -276,16 +276,16 @@ bool SSCLoader::LoadFromSSCFile( const RString &sPath, Song &out, bool bFromCach
else if( sValueName=="SELECTABLE" ) else if( sValueName=="SELECTABLE" )
{ {
if(!stricmp(sParams[1],"YES")) if(sParams[1].EqualsNoCase("YES"))
out.m_SelectionDisplay = out.SHOW_ALWAYS; out.m_SelectionDisplay = out.SHOW_ALWAYS;
else if(!stricmp(sParams[1],"NO")) else if(sParams[1].EqualsNoCase("NO"))
out.m_SelectionDisplay = out.SHOW_NEVER; out.m_SelectionDisplay = out.SHOW_NEVER;
// ROULETTE from 3.9 is no longer in use. // ROULETTE from 3.9 is no longer in use.
else if(!stricmp(sParams[1],"ROULETTE")) else if(sParams[1].EqualsNoCase("ROULETTE"))
out.m_SelectionDisplay = out.SHOW_ALWAYS; out.m_SelectionDisplay = out.SHOW_ALWAYS;
/* The following two cases are just fixes to make sure simfiles that /* The following two cases are just fixes to make sure simfiles that
* used 3.9+ features are not excluded here */ * used 3.9+ features are not excluded here */
else if(!stricmp(sParams[1],"ES") || !stricmp(sParams[1],"OMES")) else if(sParams[1].EqualsNoCase("ES") || sParams[1].EqualsNoCase("OMES"))
out.m_SelectionDisplay = out.SHOW_ALWAYS; out.m_SelectionDisplay = out.SHOW_ALWAYS;
else if( StringToInt(sParams[1]) > 0 ) else if( StringToInt(sParams[1]) > 0 )
out.m_SelectionDisplay = out.SHOW_ALWAYS; out.m_SelectionDisplay = out.SHOW_ALWAYS;
+6 -6
View File
@@ -181,7 +181,7 @@ static void GameSel( int &sel, bool ToSel, const ConfOption *pConfOption )
sel = 0; sel = 0;
for(unsigned i = 0; i < choices.size(); ++i) for(unsigned i = 0; i < choices.size(); ++i)
if( !stricmp(choices[i], sCurGameName) ) if( !choices[i].EqualsNoCase(sCurGameName) )
sel = i; sel = i;
} else { } else {
vector<const Game*> aGames; vector<const Game*> aGames;
@@ -222,12 +222,12 @@ static void Language( int &sel, bool ToSel, const ConfOption *pConfOption )
{ {
sel = -1; sel = -1;
for( unsigned i=0; sel == -1 && i < vs.size(); ++i ) for( unsigned i=0; sel == -1 && i < vs.size(); ++i )
if( !stricmp(vs[i], THEME->GetCurLanguage()) ) if( !vs[i].EqualsNoCase(THEME->GetCurLanguage()) )
sel = i; sel = i;
// If the current language doesn't exist, we'll show BASE_LANGUAGE, so select that. // If the current language doesn't exist, we'll show BASE_LANGUAGE, so select that.
for( unsigned i=0; sel == -1 && i < vs.size(); ++i ) for( unsigned i=0; sel == -1 && i < vs.size(); ++i )
if( !stricmp(vs[i], SpecialFiles::BASE_LANGUAGE) ) if( !vs[i].EqualsNoCase(SpecialFiles::BASE_LANGUAGE) )
sel = i; sel = i;
if( sel == -1 ) if( sel == -1 )
@@ -276,7 +276,7 @@ static void RequestedTheme( int &sel, bool ToSel, const ConfOption *pConfOption
{ {
sel = 0; sel = 0;
for( unsigned i=1; i<vsThemeNames.size(); i++ ) for( unsigned i=1; i<vsThemeNames.size(); i++ )
if( !stricmp(vsThemeNames[i], PREFSMAN->m_sTheme.Get()) ) if( !vsThemeNames[i].EqualsNoCase(PREFSMAN->m_sTheme.Get()) )
sel = i; sel = i;
} }
else else
@@ -302,7 +302,7 @@ static void Announcer( int &sel, bool ToSel, const ConfOption *pConfOption )
{ {
sel = 0; sel = 0;
for( unsigned i=1; i<choices.size(); i++ ) for( unsigned i=1; i<choices.size(); i++ )
if( !stricmp(choices[i], ANNOUNCER->GetCurAnnouncerName()) ) if( !choices[i].EqualsNoCase(ANNOUNCER->GetCurAnnouncerName()) )
sel = i; sel = i;
} }
else else
@@ -329,7 +329,7 @@ static void DefaultNoteSkin( int &sel, bool ToSel, const ConfOption *pConfOption
po.FromString( PREFSMAN->m_sDefaultModifiers ); po.FromString( PREFSMAN->m_sDefaultModifiers );
sel = 0; sel = 0;
for( unsigned i=0; i < choices.size(); i++ ) for( unsigned i=0; i < choices.size(); i++ )
if( !stricmp(choices[i], po.m_sNoteSkin) ) if( !choices[i].EqualsNoCase(po.m_sNoteSkin) )
sel = i; sel = i;
} }
else else
+3 -3
View File
@@ -611,13 +611,13 @@ void Song::TidyUpData()
// Skip any image that we've already classified // Skip any image that we've already classified
if( HasBanner() && stricmp(m_sBannerFile, arrayImages[i])==0 ) if( HasBanner() && m_sBannerFile.EqualsNoCase(arrayImages[i]) )
continue; // skip continue; // skip
if( HasBackground() && stricmp(m_sBackgroundFile, arrayImages[i])==0 ) if( HasBackground() && m_sBackgroundFile.EqualsNoCase(arrayImages[i]) )
continue; // skip continue; // skip
if( HasCDTitle() && stricmp(m_sCDTitleFile, arrayImages[i])==0 ) if( HasCDTitle() && m_sCDTitleFile.EqualsNoCase(arrayImages[i]) )
continue; // skip continue; // skip
// todo: add checks for Jacket, Disc, and CDImage -aj // todo: add checks for Jacket, Disc, and CDImage -aj
+1 -1
View File
@@ -879,7 +879,7 @@ void SongManager::InitRandomAttacks()
continue; continue;
} }
if( stricmp(sType,"ATTACK") != 0 ) if( !sType.EqualsNoCase("ATTACK") )
{ {
LOG->Warn( "Got \"%s:%s\" tag with wrong declaration", sType.c_str(), sAttack.c_str() ); LOG->Warn( "Got \"%s:%s\" tag with wrong declaration", sType.c_str(), sAttack.c_str() );
continue; continue;
-7
View File
@@ -192,13 +192,6 @@ typedef StdString::CStdString RString;
#include "RageException.h" #include "RageException.h"
#if !defined(WIN32)
/** @brief Define stricmp to be strcasecmp. */
#define stricmp strcasecmp
/** @brief Define strnicmp to be strncasecmp. */
#define strnicmp strncasecmp
#endif
/* Define a few functions if necessary */ /* Define a few functions if necessary */
#include <cmath> #include <cmath>