Bring light into the shadow...variables.

Yeah, yeah, can't make a good joke at 2:30 AM.
This commit is contained in:
Jason Felds
2011-03-14 02:36:48 -04:00
parent 650653b4d2
commit d855d8c7e8
18 changed files with 81 additions and 80 deletions
+5 -5
View File
@@ -750,9 +750,9 @@ static bool LoadFromMidi( const RString &sPath, Song &songOut )
if( uVelocity == 0 )
midiEventType = note_off;
MidiEvent event = { count, midiEventType };
MidiEvent mEvent = { count, midiEventType };
//float fBeat = NoteRowToBeat( MidiCountToNoteRow(count) );
vMidiEvent[uNoteNumber].push_back( event );
vMidiEvent[uNoteNumber].push_back( mEvent );
}
break;
default:
@@ -850,13 +850,13 @@ skip_track:
// hold note ending on the same row as a tap note.
NoteData::TrackMap::iterator begin, end;
noteData.GetTapNoteRangeInclusive( nnt, MidiCountToNoteRow(count), MidiCountToNoteRow(count), begin, end, true );
for( NoteData::TrackMap::iterator iter = begin; iter != end; iter++ )
for( NoteData::TrackMap::iterator lIter = begin; lIter != end; lIter++ )
{
// if( gd == expert && fBeat >= 27*4-2 && nnt == green )
// LOG->Trace( "shortening hold at %f, length %d", fBeat, length );
ASSERT( iter->second.type == TapNote::hold_head );
iter->second.iDuration = MidiCountToNoteRow(count) - iter->first - 2;
ASSERT( lIter->second.type == TapNote::hold_head );
lIter->second.iDuration = MidiCountToNoteRow(count) - lIter->first - 2;
}
noteData.SetTapNote( nnt, MidiCountToNoteRow(count), tn );