From 6a03015b016c177e0657fc6274a571db16e48b64 Mon Sep 17 00:00:00 2001 From: Stefano Facchini Date: Sat, 23 Sep 2017 10:02:16 +0200 Subject: Remove unused parameter in SPItem::doWriteTransform --- src/sp-flowtext.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/sp-flowtext.cpp') diff --git a/src/sp-flowtext.cpp b/src/sp-flowtext.cpp index 741ca7886..c5af85774 100644 --- a/src/sp-flowtext.cpp +++ b/src/sp-flowtext.cpp @@ -714,7 +714,7 @@ Geom::Affine SPFlowtext::set_transform (Geom::Affine const &xform) SPRect *rect = dynamic_cast(region->firstChild()); if (rect) { rect->set_i2d_affine(xform * rect->i2dt_affine()); - rect->doWriteTransform(rect->getRepr(), rect->transform, NULL, true); + rect->doWriteTransform(rect->transform, NULL, true); } } -- cgit v1.2.3 From c20891fabc8c3ee2251e0545878e06545b6f0cdd Mon Sep 17 00:00:00 2001 From: Marc Jeanmougin Date: Sun, 1 Oct 2017 23:57:52 +0200 Subject: First batch --- src/sp-flowtext.cpp | 22 ++++++++-------------- 1 file changed, 8 insertions(+), 14 deletions(-) (limited to 'src/sp-flowtext.cpp') diff --git a/src/sp-flowtext.cpp b/src/sp-flowtext.cpp index c5af85774..2425dada3 100644 --- a/src/sp-flowtext.cpp +++ b/src/sp-flowtext.cpp @@ -65,19 +65,14 @@ void SPFlowtext::update(SPCtx* ctx, unsigned int flags) { } childflags &= SP_OBJECT_MODIFIED_CASCADE; - GSList *l = NULL; - + std::vector l; for (auto& child: children) { sp_object_ref(&child); - l = g_slist_prepend(l, &child); + l.push_back(&child); } - l = g_slist_reverse(l); - - while (l) { - SPObject *child = reinterpret_cast(l->data); + for (auto child:l) { g_assert(child != NULL); - l = g_slist_remove(l, child); if (childflags || (child->uflags & (SP_OBJECT_MODIFIED_FLAG | SP_OBJECT_CHILD_MODIFIED_FLAG))) { SPItem *item = dynamic_cast(child); @@ -216,7 +211,7 @@ Inkscape::XML::Node* SPFlowtext::write(Inkscape::XML::Document* doc, Inkscape::X repr = doc->createElement("svg:flowRoot"); } - GSList *l = NULL; + std::vector l; for (auto& child: children) { Inkscape::XML::Node *c_repr = NULL; @@ -226,14 +221,13 @@ Inkscape::XML::Node* SPFlowtext::write(Inkscape::XML::Document* doc, Inkscape::X } if ( c_repr ) { - l = g_slist_prepend(l, c_repr); + l.push_back(c_repr); } } - while ( l ) { - repr->addChild((Inkscape::XML::Node *) l->data, NULL); - Inkscape::GC::release((Inkscape::XML::Node *) l->data); - l = g_slist_remove(l, l->data); + for (auto i=l.rbegin();i!=l.rend();++i) { + repr->addChild(*i, NULL); + Inkscape::GC::release(*i); } } else { for (auto& child: children) { -- cgit v1.2.3