13
0

MSVC won't allow us to erase an item referenced by const_iterator

This commit is contained in:
John Emmas 2017-05-06 13:33:38 +01:00
parent dea25f2692
commit e8e68fd8c6

View File

@ -236,7 +236,7 @@ CoreSelection::remove_control_by_id (PBD::ID const & id)
{
Glib::Threads::RWLock::WriterLock lm (_lock);
for (SelectedStripables::const_iterator x = _stripables.begin(); x != _stripables.end(); ++x) {
for (SelectedStripables::iterator x = _stripables.begin(); x != _stripables.end(); ++x) {
if ((*x).controllable == id) {
_stripables.erase (x);
return;
@ -249,7 +249,7 @@ CoreSelection::remove_stripable_by_id (PBD::ID const & id)
{
Glib::Threads::RWLock::WriterLock lm (_lock);
for (SelectedStripables::const_iterator x = _stripables.begin(); x != _stripables.end(); ++x) {
for (SelectedStripables::iterator x = _stripables.begin(); x != _stripables.end(); ++x) {
if ((*x).stripable == id) {
_stripables.erase (x);
return;