summaryrefslogtreecommitdiffstats
path: root/src/sp-tref.cpp
diff options
context:
space:
mode:
authorJabier Arraiza <jabier.arraiza@marker.es>2017-11-03 00:10:02 +0000
committerJabier Arraiza <jabier.arraiza@marker.es>2017-11-03 00:10:02 +0000
commitd2df0412f728dd5bb54537dfdfe7c35b34d40e0e (patch)
treee2703384779e83312c456399999997fcc289c5cf /src/sp-tref.cpp
parentMerge branch 'master' into powerpencil (diff)
parentchange assignment to equality (diff)
downloadinkscape-d2df0412f728dd5bb54537dfdfe7c35b34d40e0e.tar.gz
inkscape-d2df0412f728dd5bb54537dfdfe7c35b34d40e0e.zip
Merge branch 'master' into powerpencil
Diffstat (limited to 'src/sp-tref.cpp')
-rw-r--r--src/sp-tref.cpp10
1 files changed, 3 insertions, 7 deletions
diff --git a/src/sp-tref.cpp b/src/sp-tref.cpp
index 014876478..2655e219b 100644
--- a/src/sp-tref.cpp
+++ b/src/sp-tref.cpp
@@ -502,16 +502,12 @@ sp_tref_convert_to_tspan(SPObject *obj)
// RECURSIVE CASE
////////////////////
else {
- GSList *l = NULL;
+ std::vector<SPObject *> l;
for (auto& child: obj->children) {
sp_object_ref(&child, obj);
- l = g_slist_prepend (l, &child);
+ l.push_back(&child);
}
- l = g_slist_reverse (l);
- while (l) {
- SPObject *child = reinterpret_cast<SPObject *>(l->data); // We just built this list, so cast is safe.
- l = g_slist_remove (l, child);
-
+ for(auto child:l) {
// Note that there may be more than one conversion happening here, so if it's not a
// tref being passed into this function, the returned value can't be specifically known
new_tspan = sp_tref_convert_to_tspan(child);