Add braces to Song::ReloadFromSongDir
The LOG->Warn line is being executed unconditionally due to the the lack of braces. The indentation is misleading as a result. This adds braces to ensure the intended behavior is performed.
This commit is contained in:
@@ -498,12 +498,18 @@ bool Song::ReloadFromSongDir( RString sDir )
|
|||||||
|
|
||||||
// Reapply the Group Offset if the steps have their own timing data.
|
// Reapply the Group Offset if the steps have their own timing data.
|
||||||
if( mNewSteps[id]->m_Timing.empty() )
|
if( mNewSteps[id]->m_Timing.empty() )
|
||||||
|
{
|
||||||
continue;
|
continue;
|
||||||
|
}
|
||||||
if (SONGMAN->GetGroup(this) != nullptr)
|
if (SONGMAN->GetGroup(this) != nullptr)
|
||||||
|
{
|
||||||
mNewSteps[id]->m_Timing.m_fBeat0GroupOffsetInSeconds = SONGMAN->GetGroup(this)->GetSyncOffset();
|
mNewSteps[id]->m_Timing.m_fBeat0GroupOffsetInSeconds = SONGMAN->GetGroup(this)->GetSyncOffset();
|
||||||
|
}
|
||||||
else
|
else
|
||||||
|
{
|
||||||
m_SongTiming.m_fBeat0GroupOffsetInSeconds = PREFSMAN->m_fMachineSyncBias;
|
m_SongTiming.m_fBeat0GroupOffsetInSeconds = PREFSMAN->m_fMachineSyncBias;
|
||||||
LOG->Warn("Song %s has no group, using machine sync bias.", m_sMainTitle.c_str());
|
LOG->Warn("Song %s has no group, using machine sync bias.", m_sMainTitle.c_str());
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Now we wipe out the new pointers, which were shallow copied and not deep copied...
|
// Now we wipe out the new pointers, which were shallow copied and not deep copied...
|
||||||
|
|||||||
Reference in New Issue
Block a user