diff options
| author | Marc Jeanmougin <marc@jeanmougin.fr> | 2019-01-02 09:41:30 +0000 |
|---|---|---|
| committer | Marc Jeanmougin <marc@jeanmougin.fr> | 2019-01-02 09:41:30 +0000 |
| commit | 169dff19d4da8d76e69b8e896aa25b0013639c03 (patch) | |
| tree | a0c070fa95188b5cde708ac285e6a2db9df4a83f /src/event-log.cpp | |
| parent | Avoid creating a new document before opening an old document. (diff) | |
| download | inkscape-169dff19d4da8d76e69b8e896aa25b0013639c03.tar.gz inkscape-169dff19d4da8d76e69b8e896aa25b0013639c03.zip | |
modernize loops
Diffstat (limited to 'src/event-log.cpp')
| -rw-r--r-- | src/event-log.cpp | 30 |
1 files changed, 15 insertions, 15 deletions
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<std::unique_ptr<SignalBlocker> > blockers; - for (std::vector<DialogConnection>::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<DialogConnection>::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<std::unique_ptr<SignalBlocker> > blockers; - for (std::vector<DialogConnection>::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<DialogConnection>::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<std::unique_ptr<SignalBlocker> > blockers; - for (std::vector<DialogConnection>::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(); |
