Minor optimization: don't calc if not needed.
This commit is contained in:
+2
-3
@@ -1497,13 +1497,12 @@ void ScreenEdit::InputEdit( const InputEventPlus &input, EditButton EditB )
|
|||||||
if( EditIsBeingPressed(EDIT_BUTTON_RIGHT_SIDE) )
|
if( EditIsBeingPressed(EDIT_BUTTON_RIGHT_SIDE) )
|
||||||
ShiftToRightSide( iCol, m_NoteDataEdit.GetNumTracks() );
|
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 float fSongBeat = GetBeat();
|
||||||
const int iSongIndex = BeatToNoteRow( fSongBeat );
|
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
|
// check for to see if the user intended to remove a HoldNote
|
||||||
int iHeadRow;
|
int iHeadRow;
|
||||||
if( m_NoteDataEdit.IsHoldNoteAtRow( iCol, iSongIndex, &iHeadRow ) )
|
if( m_NoteDataEdit.IsHoldNoteAtRow( iCol, iSongIndex, &iHeadRow ) )
|
||||||
|
|||||||
Reference in New Issue
Block a user