13
0

use map::find in the currently unused MidiGhostRegion::find_event()

- the next one is still often the one we want.
This commit is contained in:
nick_m 2016-12-22 04:23:58 +11:00
parent 2000349e69
commit e75788614a

View File

@ -456,10 +456,9 @@ MidiGhostRegion::find_event (NoteBase* parent)
return (*_optimization_iterator).second; return (*_optimization_iterator).second;
} }
for (_optimization_iterator = events.begin(); _optimization_iterator != events.end(); ++_optimization_iterator) { _optimization_iterator = events.find (parent->note());
if ((*_optimization_iterator).second->event == parent) { if (_optimization_iterator != events.end()) {
return (*_optimization_iterator).second; return (*_optimization_iterator).second;
}
} }
return 0; return 0;