From ab069b13729bef775544fb3f2d71ba9bd4b1a910 Mon Sep 17 00:00:00 2001 From: Len Ovens Date: Sat, 20 May 2017 09:09:01 -0700 Subject: OSC: fix c++98 mistake --- libs/surfaces/osc/osc.cc | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) (limited to 'libs') diff --git a/libs/surfaces/osc/osc.cc b/libs/surfaces/osc/osc.cc index d23fe21ad1..05eeab5b0c 100644 --- a/libs/surfaces/osc/osc.cc +++ b/libs/surfaces/osc/osc.cc @@ -2343,11 +2343,10 @@ OSC::touch_detect (const char *path, lo_arg **argv, int argc, lo_message msg) 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; } } } @@ -3976,15 +3975,14 @@ OSC::periodic (void) 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 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; -- cgit v1.2.3