summaryrefslogtreecommitdiffstats
path: root/src/sp-defs.cpp
diff options
context:
space:
mode:
authorAdrian Boguszewski <adrbogus1@student.pg.gda.pl>2016-07-13 11:36:19 +0000
committerAdrian Boguszewski <adrbogus1@student.pg.gda.pl>2016-07-13 11:36:19 +0000
commitd1947e768272c703674129d5c583204ff2b59251 (patch)
treec1bf1563d0c0837cbab3733c18df0c7c82b18ff4 /src/sp-defs.cpp
parentMerged trunk (diff)
downloadinkscape-d1947e768272c703674129d5c583204ff2b59251.tar.gz
inkscape-d1947e768272c703674129d5c583204ff2b59251.zip
Second part of new SPObject children list
(bzr r14954.1.19)
Diffstat (limited to 'src/sp-defs.cpp')
-rw-r--r--src/sp-defs.cpp14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/sp-defs.cpp b/src/sp-defs.cpp
index dd779c0da..af4ea96d7 100644
--- a/src/sp-defs.cpp
+++ b/src/sp-defs.cpp
@@ -54,9 +54,9 @@ void SPDefs::modified(unsigned int flags) {
flags &= SP_OBJECT_MODIFIED_CASCADE;
GSList *l = NULL;
- for ( SPObject *child = this->firstChild() ; child; child = child->getNext() ) {
- sp_object_ref(child);
- l = g_slist_prepend(l, child);
+ for (auto& child: _children) {
+ sp_object_ref(&child);
+ l = g_slist_prepend(l, &child);
}
l = g_slist_reverse(l);
@@ -79,8 +79,8 @@ Inkscape::XML::Node* SPDefs::write(Inkscape::XML::Document *xml_doc, Inkscape::X
}
GSList *l = NULL;
- for ( SPObject *child = this->firstChild() ; child; child = child->getNext() ) {
- Inkscape::XML::Node *crepr = child->updateRepr(xml_doc, NULL, flags);
+ for (auto& child: _children) {
+ Inkscape::XML::Node *crepr = child.updateRepr(xml_doc, NULL, flags);
if (crepr) {
l = g_slist_prepend(l, crepr);
}
@@ -93,8 +93,8 @@ Inkscape::XML::Node* SPDefs::write(Inkscape::XML::Document *xml_doc, Inkscape::X
}
} else {
- for ( SPObject *child = this->firstChild() ; child; child = child->getNext() ) {
- child->updateRepr(flags);
+ for (auto& child: _children) {
+ child.updateRepr(flags);
}
}