X-Git-Url: https://main.carlh.net/gitweb/?a=blobdiff_plain;f=libs%2Fevoral%2Fsrc%2FControlSet.cpp;h=d4480c2897859d048eb3d014ef68c16ba0ffe038;hb=f97da74cf7d3c2d3ae580473fa4639b0b259bf5b;hp=bdc73121d246cbcb568f11c67d6bc351b9ef7597;hpb=0938a42440cc82ce8d0cb064840c258c863714ab;p=ardour.git diff --git a/libs/evoral/src/ControlSet.cpp b/libs/evoral/src/ControlSet.cpp index bdc73121d2..d4480c2897 100644 --- a/libs/evoral/src/ControlSet.cpp +++ b/libs/evoral/src/ControlSet.cpp @@ -33,9 +33,9 @@ ControlSet::ControlSet() } ControlSet::ControlSet (const ControlSet&) - : noncopyable () + : noncopyable () { - /* derived class must copy controls */ + /* derived class must copy controls */ } void @@ -47,7 +47,7 @@ ControlSet::add_control(boost::shared_ptr ac) ac->list()->InterpolationChanged.connect_same_thread ( _list_connections, boost::bind (&ControlSet::control_list_interpolation_changed, this, ac->parameter(), _1) - ); + ); } void @@ -91,26 +91,26 @@ ControlSet::find_next_event (double now, double end, ControlEvent& next_event) c next_event.when = std::numeric_limits::max(); - for (li = _controls.begin(); li != _controls.end(); ++li) { + for (li = _controls.begin(); li != _controls.end(); ++li) { ControlList::const_iterator i; boost::shared_ptr alist (li->second->list()); ControlEvent cp (now, 0.0f); - for (i = lower_bound (alist->begin(), alist->end(), &cp, ControlList::time_comparator); - i != alist->end() && (*i)->when < end; ++i) { - if ((*i)->when > now) { - break; - } - } - - if (i != alist->end() && (*i)->when < end) { - if ((*i)->when < next_event.when) { - next_event.when = (*i)->when; - } - } - } - - return next_event.when != std::numeric_limits::max(); + for (i = lower_bound (alist->begin(), alist->end(), &cp, ControlList::time_comparator); + i != alist->end() && (*i)->when < end; ++i) { + if ((*i)->when > now) { + break; + } + } + + if (i != alist->end() && (*i)->when < end) { + if ((*i)->when < next_event.when) { + next_event.when = (*i)->when; + } + } + } + + return next_event.when != std::numeric_limits::max(); } void