From 7edab29ad73c0bd90bb0dfccfb65fdb1e67c160c Mon Sep 17 00:00:00 2001 From: AJ Kelly Date: Sun, 18 Sep 2011 21:02:29 -0500 Subject: [PATCH] small formatting changes --- src/AdjustSync.cpp | 28 ++++++++++++---------------- 1 file changed, 12 insertions(+), 16 deletions(-) diff --git a/src/AdjustSync.cpp b/src/AdjustSync.cpp index 2422804a6f..1b2fc879a3 100644 --- a/src/AdjustSync.cpp +++ b/src/AdjustSync.cpp @@ -59,7 +59,6 @@ void AdjustSync::ResetOriginalSyncData() if( GAMESTATE->m_pCurSong ) { - s_vpTimingDataOriginal.push_back(GAMESTATE->m_pCurSong->m_SongTiming); const vector& vpSteps = GAMESTATE->m_pCurSong->GetAllSteps(); FOREACH( Steps*, const_cast&>(vpSteps), s ) @@ -97,7 +96,7 @@ void AdjustSync::SaveSyncChanges() { if( GAMESTATE->IsCourseMode() ) return; - + /* TODO: Save all of the timing data changes. * Luckily, only the song timing data needs comparing here. */ if( GAMESTATE->m_pCurSong && s_vpTimingDataOriginal[0] != GAMESTATE->m_pCurSong->m_SongTiming ) @@ -123,10 +122,10 @@ void AdjustSync::RevertSyncChanges() if( GAMESTATE->IsCourseMode() ) return; PREFSMAN->m_fGlobalOffsetSeconds.Set( s_fGlobalOffsetSecondsOriginal ); - + // The first one is ALWAYS the song timing. GAMESTATE->m_pCurSong->m_SongTiming = s_vpTimingDataOriginal[0]; - + unsigned location = 1; const vector& vpSteps = GAMESTATE->m_pCurSong->GetAllSteps(); FOREACH( Steps*, const_cast&>(vpSteps), s ) @@ -134,7 +133,7 @@ void AdjustSync::RevertSyncChanges() (*s)->m_Timing = s_vpTimingDataOriginal[location]; location++; } - + ResetOriginalSyncData(); s_fStandardDeviation = 0.0f; s_fAverageError = 0.0f; @@ -169,7 +168,7 @@ void AdjustSync::HandleAutosync( float fNoteOffBySeconds, float fStepTime ) AutosyncOffset(); break; - } + } default: ASSERT(0); } @@ -250,12 +249,11 @@ void AdjustSync::AutosyncTempo() if( s_fAverageError < ERROR_TOO_HIGH ) { - // Here we filter out any steps that are too far off. - // - // If it turns out that we want to be even more selective, we can - // keep only a fraction of the data, such as the 80% with the lowest - // error. However, throwing away the ones with high error should - // be enough in most cases. + /* Here we filter out any steps that are too far off. + * If it turns out that we want to be even more selective, we can keep + * only a fraction of the data, such as the 80% with the lowest error. + * However, throwing away the ones with high error should be enough + * in most cases. */ float fFilteredError = 0; s_iStepsFiltered = s_vAutosyncTempoData.size(); FilterHighErrorPoints( s_vAutosyncTempoData, fSlope, fIntercept, ERROR_TOO_HIGH ); @@ -303,7 +301,6 @@ void AdjustSync::AutosyncTempo() s_vAutosyncTempoData.clear(); } - static LocalizedString EARLIER ("AdjustSync","earlier"); static LocalizedString LATER ("AdjustSync","later"); static LocalizedString GLOBAL_OFFSET_FROM ( "AdjustSync", "Global Offset from %+.3f to %+.3f (notes %s)" ); @@ -330,9 +327,8 @@ void AdjustSync::GetSyncChangeTextGlobal( vector &vsAddTo ) { vsAddTo.push_back( ssprintf( GLOBAL_OFFSET_FROM.GetValue(), - fOld, - fNew, - (fDelta > 0 ? EARLIER:LATER).GetValue().c_str() ) ); + fOld, fNew, + (fDelta > 0 ? EARLIER:LATER).GetValue().c_str() )); } } }