From c415651f58d61f076dd1f2bac746e2dc88df94cb Mon Sep 17 00:00:00 2001 From: Glenn Maynard Date: Sat, 23 Dec 2006 01:13:45 +0000 Subject: [PATCH] cleanup; fix early out --- stepmania/src/RageSound.cpp | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/stepmania/src/RageSound.cpp b/stepmania/src/RageSound.cpp index 70d28b07d9..6d542ff3f6 100644 --- a/stepmania/src/RageSound.cpp +++ b/stepmania/src/RageSound.cpp @@ -592,6 +592,10 @@ bool RageSound::SetPositionFrames( int iFrames ) return false; } + /* If we're already there, don't do anything. */ + if( m_iSourceFrame == iFrames ) + return true; + int iRet = m_pSource->SetPosition( iFrames ); if( iRet == -1 ) { @@ -599,14 +603,8 @@ bool RageSound::SetPositionFrames( int iFrames ) return false; /* failed */ } - { - /* If we're already there, don't do anything. */ - if( m_iSourceFrame == iFrames ) - return true; - - m_iSourceFrame = iFrames; - m_iStoppedSourceFrame = iFrames; - } + m_iSourceFrame = iFrames; + m_iStoppedSourceFrame = iFrames; if( iRet == 0 ) {