From 7bbeb689db6d10f689e5c697ae019e777ae2b80f Mon Sep 17 00:00:00 2001 From: Jason Felds Date: Thu, 24 Jan 2013 23:07:16 -0500 Subject: [PATCH] Another batch of gotos gone. Using the fake infinite loop style to avoid the (stupid) windows constant evaluation pedantic warning. --- src/Player.cpp | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/src/Player.cpp b/src/Player.cpp index b158a19ee8..846a06463f 100644 --- a/src/Player.cpp +++ b/src/Player.cpp @@ -2439,19 +2439,20 @@ void Player::StepStrumHopo( int col, int row, const RageTimer &tm, bool bHeld, b { bool bDidHopo = true; + for (;;) { // only can hopo on a row with one note if( m_NoteData.GetNumTapNotesInRow(iRowOfOverlappingNoteOrRow) != 1 ) { bDidHopo = false; - goto done_checking_hopo; + break; } // con't hopo on the same note 2x in a row if( col == m_pPlayerState->m_iLastHopoNoteCol ) { bDidHopo = false; - goto done_checking_hopo; + break; } const TapNote &tn = m_NoteData.GetTapNote( col, iRowOfOverlappingNoteOrRow ); @@ -2463,17 +2464,17 @@ void Player::StepStrumHopo( int col, int row, const RageTimer &tm, bool bHeld, b if( !NoteDataWithScoring::IsRowCompletelyJudged(m_NoteData, iter.Row()) ) { bDidHopo = false; - goto done_checking_hopo; + break; } const TapNoteResult &lastTNR = NoteDataWithScoring::LastTapNoteWithResult( m_NoteData, iter.Row() ).result; if( lastTNR.tns <= TNS_Miss ) { bDidHopo = false; - goto done_checking_hopo; } + break; } -done_checking_hopo: + if( !bDidHopo ) { score = TNS_None;