From 169dff19d4da8d76e69b8e896aa25b0013639c03 Mon Sep 17 00:00:00 2001 From: Marc Jeanmougin Date: Wed, 2 Jan 2019 10:41:30 +0100 Subject: modernize loops --- src/event-log.cpp | 30 +++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-) (limited to 'src/event-log.cpp') diff --git a/src/event-log.cpp b/src/event-log.cpp index a3ee8cd12..0df1043dd 100644 --- a/src/event-log.cpp +++ b/src/event-log.cpp @@ -119,32 +119,32 @@ public: void collapseRow(Gtk::TreeModel::Path const &path) { std::vector > blockers; - for (std::vector::iterator it(_connections.begin()); it != _connections.end(); ++it) + for (auto & _connection : _connections) { - addBlocker(blockers, &(*it->_callback_connections)[Inkscape::EventLog::CALLB_SELECTION_CHANGE]); - addBlocker(blockers, &(*it->_callback_connections)[Inkscape::EventLog::CALLB_COLLAPSE]); + addBlocker(blockers, &(*_connection._callback_connections)[Inkscape::EventLog::CALLB_SELECTION_CHANGE]); + addBlocker(blockers, &(*_connection._callback_connections)[Inkscape::EventLog::CALLB_COLLAPSE]); } - for (std::vector::iterator it(_connections.begin()); it != _connections.end(); ++it) + for (auto & _connection : _connections) { - it->_event_list_view->collapse_row(path); + _connection._event_list_view->collapse_row(path); } } void selectRow(Gtk::TreeModel::Path const &path) { std::vector > blockers; - for (std::vector::iterator it(_connections.begin()); it != _connections.end(); ++it) + for (auto & _connection : _connections) { - addBlocker(blockers, &(*it->_callback_connections)[Inkscape::EventLog::CALLB_SELECTION_CHANGE]); - addBlocker(blockers, &(*it->_callback_connections)[Inkscape::EventLog::CALLB_EXPAND]); + addBlocker(blockers, &(*_connection._callback_connections)[Inkscape::EventLog::CALLB_SELECTION_CHANGE]); + addBlocker(blockers, &(*_connection._callback_connections)[Inkscape::EventLog::CALLB_EXPAND]); } - for (std::vector::iterator it(_connections.begin()); it != _connections.end(); ++it) + for (auto & _connection : _connections) { - it->_event_list_view->expand_to_path(path); - it->_event_list_selection->select(path); - it->_event_list_view->scroll_to_row(path); + _connection._event_list_view->expand_to_path(path); + _connection._event_list_selection->select(path); + _connection._event_list_view->scroll_to_row(path); } } @@ -152,10 +152,10 @@ public: { if (eventListStore) { std::vector > blockers; - for (std::vector::iterator it(_connections.begin()); it != _connections.end(); ++it) + for (auto & _connection : _connections) { - addBlocker(blockers, &(*it->_callback_connections)[Inkscape::EventLog::CALLB_SELECTION_CHANGE]); - addBlocker(blockers, &(*it->_callback_connections)[Inkscape::EventLog::CALLB_EXPAND]); + addBlocker(blockers, &(*_connection._callback_connections)[Inkscape::EventLog::CALLB_SELECTION_CHANGE]); + addBlocker(blockers, &(*_connection._callback_connections)[Inkscape::EventLog::CALLB_EXPAND]); } eventListStore->clear(); -- cgit v1.2.3