From d1947e768272c703674129d5c583204ff2b59251 Mon Sep 17 00:00:00 2001 From: Adrian Boguszewski Date: Wed, 13 Jul 2016 13:36:19 +0200 Subject: Second part of new SPObject children list (bzr r14954.1.19) --- src/sp-defs.cpp | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'src/sp-defs.cpp') 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); } } -- cgit v1.2.3 From 24d3f50003ca3cec6a03a7f5267cc4fe5588c69f Mon Sep 17 00:00:00 2001 From: Adrian Boguszewski Date: Thu, 14 Jul 2016 13:17:21 +0200 Subject: Renamed children list in SPObject (bzr r14954.1.21) --- src/sp-defs.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/sp-defs.cpp') diff --git a/src/sp-defs.cpp b/src/sp-defs.cpp index af4ea96d7..865c6891e 100644 --- a/src/sp-defs.cpp +++ b/src/sp-defs.cpp @@ -54,7 +54,7 @@ void SPDefs::modified(unsigned int flags) { flags &= SP_OBJECT_MODIFIED_CASCADE; GSList *l = NULL; - for (auto& child: _children) { + for (auto& child: children) { sp_object_ref(&child); l = g_slist_prepend(l, &child); } @@ -79,7 +79,7 @@ Inkscape::XML::Node* SPDefs::write(Inkscape::XML::Document *xml_doc, Inkscape::X } GSList *l = NULL; - for (auto& child: _children) { + for (auto& child: children) { Inkscape::XML::Node *crepr = child.updateRepr(xml_doc, NULL, flags); if (crepr) { l = g_slist_prepend(l, crepr); @@ -93,7 +93,7 @@ Inkscape::XML::Node* SPDefs::write(Inkscape::XML::Document *xml_doc, Inkscape::X } } else { - for (auto& child: _children) { + for (auto& child: children) { child.updateRepr(flags); } } -- cgit v1.2.3