Don't define a variable until it's needed.
Still suspect there's an issue here, but can't identify what.
This commit is contained in:
+2
-2
@@ -2940,13 +2940,13 @@ void Player::RandomizeNotes( int iNoteRow )
|
|||||||
int iNumOfTracks = m_NoteData.GetNumTracks();
|
int iNumOfTracks = m_NoteData.GetNumTracks();
|
||||||
for( int t=0; t+1 < iNumOfTracks; t++ )
|
for( int t=0; t+1 < iNumOfTracks; t++ )
|
||||||
{
|
{
|
||||||
const int iSwapWith = RandomInt( iNumOfTracks );
|
|
||||||
|
|
||||||
/* Only swap a tap and an empty. */
|
/* Only swap a tap and an empty. */
|
||||||
NoteData::iterator iter = m_NoteData.FindTapNote( t, iNewNoteRow );
|
NoteData::iterator iter = m_NoteData.FindTapNote( t, iNewNoteRow );
|
||||||
if( iter == m_NoteData.end(t) || iter->second.type != TapNote::tap )
|
if( iter == m_NoteData.end(t) || iter->second.type != TapNote::tap )
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
|
const int iSwapWith = RandomInt( iNumOfTracks );
|
||||||
|
|
||||||
// Make sure this is empty.
|
// Make sure this is empty.
|
||||||
if( m_NoteData.FindTapNote(iSwapWith, iNewNoteRow) != m_NoteData.end(iSwapWith) )
|
if( m_NoteData.FindTapNote(iSwapWith, iNewNoteRow) != m_NoteData.end(iSwapWith) )
|
||||||
continue;
|
continue;
|
||||||
|
|||||||
Reference in New Issue
Block a user