summaryrefslogtreecommitdiffstats
path: root/src/sp-tref.cpp
diff options
context:
space:
mode:
authorMarc Jeanmougin <marc@jeanmougin.fr>2017-10-01 21:57:52 +0000
committerMarc Jeanmougin <marc@jeanmougin.fr>2017-10-01 21:57:52 +0000
commitc20891fabc8c3ee2251e0545878e06545b6f0cdd (patch)
treec19727ea5ec4c7fb90b7e4512a3cc5fb89f58945 /src/sp-tref.cpp
parentMerge branch 'master' of gitlab.com:inkscape/inkscape (diff)
downloadinkscape-c20891fabc8c3ee2251e0545878e06545b6f0cdd.tar.gz
inkscape-c20891fabc8c3ee2251e0545878e06545b6f0cdd.zip
First batch
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);