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-item.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-item.cpp')
| -rw-r--r-- | src/display/drawing-item.cpp | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/src/display/drawing-item.cpp b/src/display/drawing-item.cpp index d3729da94..6777be5cc 100644 --- a/src/display/drawing-item.cpp +++ b/src/display/drawing-item.cpp @@ -254,9 +254,9 @@ DrawingItem::clearChildren() // prevent children from referencing the parent during deletion // this way, children won't try to remove themselves from a list // from which they have already been removed by clear_and_dispose - for (ChildrenList::iterator i = _children.begin(); i != _children.end(); ++i) { - i->_parent = NULL; - i->_child_type = CHILD_ORPHAN; + for (auto & i : _children) { + i._parent = NULL; + i._child_type = CHILD_ORPHAN; } _children.clear_and_dispose(DeleteDisposer()); _markForUpdate(STATE_ALL, false); @@ -418,8 +418,8 @@ void DrawingItem::setChildrenStyle(SPStyle* context_style) { _context_style = context_style; - for (ChildrenList::iterator i = _children.begin(); i != _children.end(); ++i) { - i->setChildrenStyle( context_style ); + for (auto & i : _children) { + i.setChildrenStyle( context_style ); } } @@ -1053,8 +1053,8 @@ DrawingItem::recursivePrintTree( unsigned level ) std::cout << " "; } std::cout << name() << std::endl; - for (ChildrenList::iterator i = _children.begin(); i != _children.end(); ++i) { - i->recursivePrintTree( level+1 ); + for (auto & i : _children) { + i.recursivePrintTree( level+1 ); } } @@ -1105,8 +1105,8 @@ DrawingItem::_invalidateFilterBackground(Geom::IntRect const &area) _cache->markDirty(area); } - for (ChildrenList::iterator i = _children.begin(); i != _children.end(); ++i) { - i->_invalidateFilterBackground(area); + for (auto & i : _children) { + i._invalidateFilterBackground(area); } } |
