From b3cebd2aafc32cda92612fbd192cc45df4a91579 Mon Sep 17 00:00:00 2001 From: Jason Felds Date: Tue, 24 May 2011 21:29:51 -0400 Subject: [PATCH] No need to swap if it's the same column. Still busted, but still stumped. Doing what I can to optimize. --- src/Player.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/Player.cpp b/src/Player.cpp index c65d9ed1d4..6ebcdfac8b 100644 --- a/src/Player.cpp +++ b/src/Player.cpp @@ -2947,6 +2947,10 @@ void Player::RandomizeNotes( int iNoteRow ) const int iSwapWith = RandomInt( iNumOfTracks ); + // Make sure we're not swapping with ourselves. + if( t == iSwapWith ) + continue; + // Make sure this is empty. if( m_NoteData.FindTapNote(iSwapWith, iNewNoteRow) != m_NoteData.end(iSwapWith) ) continue;