From cfbe6b6048030f2a69f3ae612c5571432fa8f4de Mon Sep 17 00:00:00 2001 From: Paul Davis Date: Sun, 15 Jan 2023 08:36:24 -0700 Subject: [PATCH] another use of auto iterators --- libs/canvas/item.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libs/canvas/item.cc b/libs/canvas/item.cc index 68e88caea1..7528bb8863 100644 --- a/libs/canvas/item.cc +++ b/libs/canvas/item.cc @@ -1247,8 +1247,8 @@ Item::add_items_at_point (Duple const point, vector& items) const items.push_back (this); } - for (vector::iterator i = our_items.begin(); i != our_items.end(); ++i) { - (*i)->add_items_at_point (point, items); + for (const auto & i : our_items) { + i->add_items_at_point (point, items); } }