diff --git a/gtk2_ardour/automation_line.cc b/gtk2_ardour/automation_line.cc index b37f6af714..5326629934 100644 --- a/gtk2_ardour/automation_line.cc +++ b/gtk2_ardour/automation_line.cc @@ -343,8 +343,8 @@ AutomationLine::sync_model_with_view_points (list cp) update_pending = true; bool moved = false; - for (list::iterator i = cp.begin(); i != cp.end(); ++i) { - moved = sync_model_with_view_point (**i) || moved; + for (auto const & vp : cp) { + moved = sync_model_with_view_point (*vp) || moved; } return moved; @@ -622,8 +622,8 @@ AutomationLine::drag_motion (double const x, float fraction, bool ignore_x, bool contiguous_points.pop_back (); } - for (vector::iterator ccp = contiguous_points.begin(); ccp != contiguous_points.end(); ++ccp) { - (*ccp)->compute_x_bounds (trackview.editor()); + for (auto const & ccp : contiguous_points) { + ccp->compute_x_bounds (trackview.editor()); } _drag_had_movement = true; }