goto -> fake infinite.
This commit is contained in:
@@ -1722,13 +1722,16 @@ void NoteDataUtil::InsertIntelligentTaps(
|
||||
int iTrackOfNoteLater = -1;
|
||||
inout.GetTapFirstNonEmptyTrack( iRowLater, iTrackOfNoteLater );
|
||||
int iTrackOfNoteToAdd = 0;
|
||||
|
||||
for (;;)
|
||||
{
|
||||
if( bSkippy &&
|
||||
iTrackOfNoteEarlier != iTrackOfNoteLater ) // Don't make skips on the same note
|
||||
{
|
||||
if( bEarlierHasNonEmptyTrack )
|
||||
{
|
||||
iTrackOfNoteToAdd = iTrackOfNoteEarlier;
|
||||
goto done_looking_for_track_to_add;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1736,24 +1739,25 @@ void NoteDataUtil::InsertIntelligentTaps(
|
||||
if( abs(iTrackOfNoteEarlier-iTrackOfNoteLater) >= 2 )
|
||||
{
|
||||
iTrackOfNoteToAdd = min(iTrackOfNoteEarlier,iTrackOfNoteLater)+1;
|
||||
goto done_looking_for_track_to_add;
|
||||
break;
|
||||
}
|
||||
|
||||
// try to choose a track just to the left
|
||||
if( min(iTrackOfNoteEarlier,iTrackOfNoteLater)-1 >= 0 )
|
||||
{
|
||||
iTrackOfNoteToAdd = min(iTrackOfNoteEarlier,iTrackOfNoteLater)-1;
|
||||
goto done_looking_for_track_to_add;
|
||||
break;
|
||||
}
|
||||
|
||||
// try to choose a track just to the right
|
||||
if( max(iTrackOfNoteEarlier,iTrackOfNoteLater)+1 < inout.GetNumTracks() )
|
||||
{
|
||||
iTrackOfNoteToAdd = max(iTrackOfNoteEarlier,iTrackOfNoteLater)+1;
|
||||
goto done_looking_for_track_to_add;
|
||||
break;
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
done_looking_for_track_to_add:
|
||||
inout.SetTapNote(iTrackOfNoteToAdd, iRowToAdd, TAP_ADDITION_TAP);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user