Change some RString methods to free functions

These ones aren't a std::string method. Doing this helps the RString to
std::string migration.
This commit is contained in:
Arthur Eubanks
2025-04-29 22:01:23 -07:00
committed by teejusb
parent 9449317430
commit 995f0ea8c1
109 changed files with 587 additions and 618 deletions
+6 -6
View File
@@ -187,7 +187,7 @@ bool SMALoader::LoadFromSimfile( const RString &sPath, Song &out, bool bFromCach
int iNumParams = msd.GetNumParams(i);
const MsdFile::value_t &sParams = msd.GetValue(i);
RString sValueName = sParams[0];
sValueName.MakeUpper();
MakeUpper(sValueName);
// handle the data
/* Don't use GetMainAndSubTitlesFromFullTitle; that's only for heuristically
@@ -332,18 +332,18 @@ bool SMALoader::LoadFromSimfile( const RString &sPath, Song &out, bool bFromCach
else if( sValueName=="SELECTABLE" )
{
if(sParams[1].EqualsNoCase("YES"))
if(EqualsNoCase(sParams[1], "YES"))
out.m_SelectionDisplay = out.SHOW_ALWAYS;
else if(sParams[1].EqualsNoCase("NO"))
else if(EqualsNoCase(sParams[1], "NO"))
out.m_SelectionDisplay = out.SHOW_NEVER;
// ROULETTE from 3.9. It was removed since UnlockManager can serve
// the same purpose somehow. This, of course, assumes you're using
// unlocks. -aj
else if(sParams[1].EqualsNoCase("ROULETTE"))
else if(EqualsNoCase(sParams[1], "ROULETTE"))
out.m_SelectionDisplay = out.SHOW_ALWAYS;
/* The following two cases are just fixes to make sure simfiles that
* used 3.9+ features are not excluded here */
else if(sParams[1].EqualsNoCase("ES") || sParams[1].EqualsNoCase("OMES"))
else if(EqualsNoCase(sParams[1], "ES") || EqualsNoCase(sParams[1], "OMES"))
out.m_SelectionDisplay = out.SHOW_ALWAYS;
else if( StringToInt(sParams[1]) > 0 )
out.m_SelectionDisplay = out.SHOW_ALWAYS;
@@ -354,7 +354,7 @@ bool SMALoader::LoadFromSimfile( const RString &sPath, Song &out, bool bFromCach
sParams[1].c_str() );
}
else if( sValueName.Left(strlen("BGCHANGES"))=="BGCHANGES" || sValueName=="ANIMATIONS" )
else if( Left(sValueName, strlen("BGCHANGES"))=="BGCHANGES" || sValueName=="ANIMATIONS" )
{
SMLoader::ProcessBGChanges( out, sValueName, sPath, sParams[1]);
}