Integrate C++11 branch into 5_1-new

This commit is contained in:
teejusb
2019-06-22 12:35:38 -07:00
444 changed files with 19503 additions and 21007 deletions
+9 -9
View File
@@ -33,11 +33,11 @@ void SMALoader::ProcessMultipliers( TimingData &out, const int iRowsPerBeat, con
continue;
}
const float fComboBeat = RowToBeat( arrayMultiplierValues[0], iRowsPerBeat );
const int iCombos = StringToInt( arrayMultiplierValues[1] ); // always true.
const int iCombos = std::stoi( arrayMultiplierValues[1] ); // always true.
// hoping I'm right here: SMA files can use 6 values after the row/beat.
const int iMisses = (size == 2 || size == 4 ?
iCombos :
StringToInt(arrayMultiplierValues[2]));
std::stoi(arrayMultiplierValues[2]));
out.AddSegment( ComboSegment(BeatToNoteRow(fComboBeat), iCombos, iMisses) );
}
}
@@ -47,10 +47,10 @@ void SMALoader::ProcessBeatsPerMeasure( TimingData &out, const RString sParam )
vector<RString> vs1;
split( sParam, ",", vs1 );
FOREACH_CONST( RString, vs1, s1 )
for (RString const &s1 : vs1)
{
vector<RString> vs2;
split( *s1, "=", vs2 );
split( s1, "=", vs2 );
if( vs2.size() < 2 )
{
@@ -61,7 +61,7 @@ void SMALoader::ProcessBeatsPerMeasure( TimingData &out, const RString sParam )
continue;
}
const float fBeat = StringToFloat( vs2[0] );
const int iNumerator = StringToInt( vs2[1] );
const int iNumerator = std::stoi( vs2[1] );
if( fBeat < 0 )
{
@@ -89,7 +89,7 @@ void SMALoader::ProcessSpeeds( TimingData &out, const RString line, const int ro
vector<RString> vs1;
split( line, ",", vs1 );
FOREACH_CONST( RString, vs1, s1 )
for (std::vector<RString>::const_iterator s1 = vs1.begin(); s1 != vs1.end(); ++s1)
{
vector<RString> vs2;
vs2.clear(); // trying something.
@@ -161,7 +161,7 @@ bool SMALoader::LoadFromSimfile( const RString &sPath, Song &out, bool bFromCach
out.m_SongTiming.m_sFile = sPath; // songs still have their fallback timing.
out.m_sSongFileName = sPath;
Steps* pNewNotes = NULL;
Steps* pNewNotes = nullptr;
int iRowsPerBeat = -1; // Start with an invalid value: needed for checking.
vector< pair<float, float> > vBPMChanges, vStops;
@@ -296,7 +296,7 @@ bool SMALoader::LoadFromSimfile( const RString &sPath, Song &out, bool bFromCach
vector<RString> arrayBeatChangeValues;
split( arrayBeatChangeExpressions[0], "=", arrayBeatChangeValues );
iRowsPerBeat = StringToInt(arrayBeatChangeValues[1]);
iRowsPerBeat = std::stoi(arrayBeatChangeValues[1]);
}
else
{
@@ -328,7 +328,7 @@ bool SMALoader::LoadFromSimfile( const RString &sPath, Song &out, bool bFromCach
* used 3.9+ features are not excluded here */
else if(sParams[1].EqualsNoCase("ES") || sParams[1].EqualsNoCase("OMES"))
out.m_SelectionDisplay = out.SHOW_ALWAYS;
else if( StringToInt(sParams[1]) > 0 )
else if( std::stoi(sParams[1]) > 0 )
out.m_SelectionDisplay = out.SHOW_ALWAYS;
else
LOG->UserLog("Song file",