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:
parent
2000349e69
commit
e75788614a
@ -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;
|
||||||
|
Loading…
Reference in New Issue
Block a user