mirror of
https://github.com/Ardour/ardour.git
synced 2025-12-18 04:36:30 +01:00
C++98 compatible map erase
This commit is contained in:
parent
7d1a7b076f
commit
d50d8b9d33
1 changed files with 4 additions and 3 deletions
|
|
@ -1408,7 +1408,6 @@ AlsaAudioBackend::auto_update_midi_devices ()
|
||||||
if (_midi_devices.find (i->first) != _midi_devices.end()) {
|
if (_midi_devices.find (i->first) != _midi_devices.end()) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
printf ("NEW MIDI DEVICE %s", i->first.c_str());
|
|
||||||
_midi_devices[i->first] = new AlsaMidiDeviceInfo (false);
|
_midi_devices[i->first] = new AlsaMidiDeviceInfo (false);
|
||||||
set_midi_device_enabled (i->first, true);
|
set_midi_device_enabled (i->first, true);
|
||||||
}
|
}
|
||||||
|
|
@ -1418,9 +1417,11 @@ AlsaAudioBackend::auto_update_midi_devices ()
|
||||||
++i;
|
++i;
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
printf ("REMOVE MIDI DEVICE %s", i->first.c_str());
|
|
||||||
set_midi_device_enabled (i->first, false);
|
set_midi_device_enabled (i->first, false);
|
||||||
i = _midi_devices.erase (i);
|
std::map<std::string, struct AlsaMidiDeviceInfo *>::iterator tmp = i;
|
||||||
|
++tmp;
|
||||||
|
_midi_devices.erase (i);
|
||||||
|
i = tmp;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue