control->stop_touch (true, control->session().transport_frame());
}
// just in case some crazy surface starts sending control values before touch
- for (FakeTouchMap::iterator x = _touch_timeout.begin(); x != _touch_timeout.end();) {
+ for (FakeTouchMap::iterator x = _touch_timeout.begin(); x != _touch_timeout.end(); x++) {
if ((*x).first == control) {
- x = _touch_timeout.erase (x);
- } else {
- ++x;
+ _touch_timeout.erase (x);
+ break;
}
}
}
co->tick();
}
}
- for (FakeTouchMap::iterator x = _touch_timeout.begin(); x != _touch_timeout.end();) {
+ for (FakeTouchMap::iterator x = _touch_timeout.begin(); x != _touch_timeout.end(); x++) {
_touch_timeout[(*x).first] = (*x).second - 1;
if (!(*x).second) {
boost::shared_ptr<ARDOUR::AutomationControl> ctrl = (*x).first;
// turn touch off
ctrl->stop_touch (true, ctrl->session().transport_frame());
- x = _touch_timeout.erase (x);
- } else {
- ++x;
+ _touch_timeout.erase (x);
+ break;
}
}
return true;