13
0

possibly faster way to clear ghost events.

This commit is contained in:
nick_m 2016-12-23 23:03:22 +11:00
parent cb2bbb87d7
commit efacbb1485

View File

@ -356,11 +356,14 @@ MidiGhostRegion::add_note (NoteBase* n)
void
MidiGhostRegion::clear_events()
{
for (EventList::iterator it = events.begin(); it != events.end(); ++it) {
EventList::iterator it = events.begin();
while (it != events.end()) {
delete (*it).second;
events.erase (it);
++it;
}
events.clear();
_optimization_iterator = events.end ();
}