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/display/drawing.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/display/drawing.cpp')
| -rw-r--r-- | src/display/drawing.cpp | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/src/display/drawing.cpp b/src/display/drawing.cpp index 3b41fc4c0..511de780a 100644 --- a/src/display/drawing.cpp +++ b/src/display/drawing.cpp @@ -146,10 +146,9 @@ void Drawing::setCacheLimit(Geom::OptIntRect const &r) { _cache_limit = r; - for (std::set<DrawingItem *>::iterator i = _cached_items.begin(); - i != _cached_items.end(); ++i) + for (auto _cached_item : _cached_items) { - (*i)->_markForUpdate(DrawingItem::STATE_CACHE, false); + _cached_item->_markForUpdate(DrawingItem::STATE_CACHE, false); } } void @@ -234,8 +233,8 @@ Drawing::_pickItemsForCaching() std::set_difference(_cached_items.begin(), _cached_items.end(), to_cache.begin(), to_cache.end(), std::inserter(to_uncache, to_uncache.end())); - for (std::set<DrawingItem*>::iterator j = to_uncache.begin(); j != to_uncache.end(); ++j) { - (*j)->setCached(false); + for (auto j : to_uncache) { + j->setCached(false); } } |
