Minor optimization: don't calc if not needed.

This commit is contained in:
Jason Felds
2011-10-17 22:58:04 -04:00
parent 48687e8df5
commit d65b4ba714
+4 -5
View File
@@ -1496,14 +1496,13 @@ void ScreenEdit::InputEdit( const InputEventPlus &input, EditButton EditB )
// Alt + number = input to right half
if( EditIsBeingPressed(EDIT_BUTTON_RIGHT_SIDE) )
ShiftToRightSide( iCol, m_NoteDataEdit.GetNumTracks() );
if( iCol >= m_NoteDataEdit.GetNumTracks() )
break; // this button is not in the range of columns for this Style
const float fSongBeat = GetBeat();
const int iSongIndex = BeatToNoteRow( fSongBeat );
if( iCol >= m_NoteDataEdit.GetNumTracks() ) // this button is not in the range of columns for this Style
break;
// check for to see if the user intended to remove a HoldNote
int iHeadRow;
if( m_NoteDataEdit.IsHoldNoteAtRow( iCol, iSongIndex, &iHeadRow ) )