diff options
| author | Jabier Arraiza <jabier.arraiza@marker.es> | 2017-11-03 00:10:02 +0000 |
|---|---|---|
| committer | Jabier Arraiza <jabier.arraiza@marker.es> | 2017-11-03 00:10:02 +0000 |
| commit | d2df0412f728dd5bb54537dfdfe7c35b34d40e0e (patch) | |
| tree | e2703384779e83312c456399999997fcc289c5cf /src/sp-tref.cpp | |
| parent | Merge branch 'master' into powerpencil (diff) | |
| parent | change assignment to equality (diff) | |
| download | inkscape-d2df0412f728dd5bb54537dfdfe7c35b34d40e0e.tar.gz inkscape-d2df0412f728dd5bb54537dfdfe7c35b34d40e0e.zip | |
Merge branch 'master' into powerpencil
Diffstat (limited to 'src/sp-tref.cpp')
| -rw-r--r-- | src/sp-tref.cpp | 10 |
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); |
