use C++11 auto iterator

This commit is contained in:
Paul Davis 2023-02-06 20:19:20 -07:00
parent 4796a3643d
commit 8c6fa19bcf

View File

@ -343,8 +343,8 @@ AutomationLine::sync_model_with_view_points (list<ControlPoint*> cp)
update_pending = true; update_pending = true;
bool moved = false; bool moved = false;
for (list<ControlPoint*>::iterator i = cp.begin(); i != cp.end(); ++i) { for (auto const & vp : cp) {
moved = sync_model_with_view_point (**i) || moved; moved = sync_model_with_view_point (*vp) || moved;
} }
return moved; return moved;
@ -622,8 +622,8 @@ AutomationLine::drag_motion (double const x, float fraction, bool ignore_x, bool
contiguous_points.pop_back (); contiguous_points.pop_back ();
} }
for (vector<CCP>::iterator ccp = contiguous_points.begin(); ccp != contiguous_points.end(); ++ccp) { for (auto const & ccp : contiguous_points) {
(*ccp)->compute_x_bounds (trackview.editor()); ccp->compute_x_bounds (trackview.editor());
} }
_drag_had_movement = true; _drag_had_movement = true;
} }