Remove unneeded return value from ProcessBPMs
This commit is contained in:
@@ -235,7 +235,7 @@ void SMLoader::ParseBPMs( vector< pair<float, float> > &out, const RString line,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
bool SMLoader::ProcessBPMs( TimingData &out, const vector< pair<float, float> > &vBPMChanges )
|
void SMLoader::ProcessBPMs( TimingData &out, const vector< pair<float, float> > &vBPMChanges )
|
||||||
{
|
{
|
||||||
// prepare storage variables for negative BPMs -> Warps.
|
// prepare storage variables for negative BPMs -> Warps.
|
||||||
float negBeat = -1;
|
float negBeat = -1;
|
||||||
@@ -286,8 +286,6 @@ bool SMLoader::ProcessBPMs( TimingData &out, const vector< pair<float, float> >
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return bNotEmpty;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void SMLoader::ParseStops( vector< pair<float, float> > &out, const RString line, const int rowsPerBeat )
|
void SMLoader::ParseStops( vector< pair<float, float> > &out, const RString line, const int rowsPerBeat )
|
||||||
|
|||||||
+2
-3
@@ -79,9 +79,8 @@ struct SMLoader
|
|||||||
/**
|
/**
|
||||||
* @brief Process the BPM Segments from the string.
|
* @brief Process the BPM Segments from the string.
|
||||||
* @param out the TimingData being modified.
|
* @param out the TimingData being modified.
|
||||||
* @param vBPMChanges the vector of BPM Changes data.
|
* @param vBPMChanges the vector of BPM Changes data. */
|
||||||
* @return true if there was at least one segment found, false otherwise. */
|
void ProcessBPMs(TimingData & out,
|
||||||
bool ProcessBPMs(TimingData & out,
|
|
||||||
const vector< pair<float, float> > &vBPMChanges);
|
const vector< pair<float, float> > &vBPMChanges);
|
||||||
/**
|
/**
|
||||||
* @brief Parse Stops data from a string.
|
* @brief Parse Stops data from a string.
|
||||||
|
|||||||
@@ -654,8 +654,9 @@ bool SSCLoader::LoadFromSimfile( const RString &sPath, Song &out, bool bFromCach
|
|||||||
else if( sValueName=="NOTES" || sValueName=="NOTES2" )
|
else if( sValueName=="NOTES" || sValueName=="NOTES2" )
|
||||||
{
|
{
|
||||||
// Process timings and convert negative bpms/stops
|
// Process timings and convert negative bpms/stops
|
||||||
if( SMLoader::ProcessBPMs(stepsTiming, vBPMChanges) )
|
if( !vBPMChanges.empty() )
|
||||||
bHasOwnTiming = true;
|
bHasOwnTiming = true;
|
||||||
|
SMLoader::ProcessBPMs(stepsTiming, vBPMChanges);
|
||||||
SMLoader::ProcessStops(stepsTiming, vStops);
|
SMLoader::ProcessStops(stepsTiming, vStops);
|
||||||
|
|
||||||
state = GETTING_SONG_INFO;
|
state = GETTING_SONG_INFO;
|
||||||
@@ -805,8 +806,9 @@ bool SSCLoader::LoadFromSimfile( const RString &sPath, Song &out, bool bFromCach
|
|||||||
else if( sValueName=="STEPFILENAME" )
|
else if( sValueName=="STEPFILENAME" )
|
||||||
{
|
{
|
||||||
// Process timings and convert negative bpms/stops
|
// Process timings and convert negative bpms/stops
|
||||||
if( SMLoader::ProcessBPMs(stepsTiming, vBPMChanges) )
|
if( !vBPMChanges.empty() )
|
||||||
bHasOwnTiming = true;
|
bHasOwnTiming = true;
|
||||||
|
SMLoader::ProcessBPMs(stepsTiming, vBPMChanges);
|
||||||
SMLoader::ProcessStops(stepsTiming, vStops);
|
SMLoader::ProcessStops(stepsTiming, vStops);
|
||||||
|
|
||||||
state = GETTING_SONG_INFO;
|
state = GETTING_SONG_INFO;
|
||||||
@@ -857,7 +859,6 @@ bool SSCLoader::LoadEditFromMsd(const MsdFile &msd,
|
|||||||
Song* pSong = NULL;
|
Song* pSong = NULL;
|
||||||
Steps* pNewNotes = NULL;
|
Steps* pNewNotes = NULL;
|
||||||
bool bSSCFormat = false;
|
bool bSSCFormat = false;
|
||||||
bool bHasOwnTiming = false;
|
|
||||||
TimingData stepsTiming;
|
TimingData stepsTiming;
|
||||||
vector< pair<float, float> > vBPMChanges, vStops;
|
vector< pair<float, float> > vBPMChanges, vStops;
|
||||||
|
|
||||||
@@ -1046,13 +1047,12 @@ bool SSCLoader::LoadEditFromMsd(const MsdFile &msd,
|
|||||||
return true;
|
return true;
|
||||||
|
|
||||||
// Process timings and convert negative bpms/stops
|
// Process timings and convert negative bpms/stops
|
||||||
if( SMLoader::ProcessBPMs(stepsTiming, vBPMChanges) )
|
SMLoader::ProcessBPMs(stepsTiming, vBPMChanges);
|
||||||
bHasOwnTiming = true;
|
|
||||||
SMLoader::ProcessStops(stepsTiming, vStops);
|
SMLoader::ProcessStops(stepsTiming, vStops);
|
||||||
|
|
||||||
if( bSSCFormat )
|
if( bSSCFormat )
|
||||||
{
|
{
|
||||||
if ( bHasOwnTiming )
|
if ( !vBPMChanges.empty() )
|
||||||
{
|
{
|
||||||
pNewNotes->m_Timing = stepsTiming;
|
pNewNotes->m_Timing = stepsTiming;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user