diff options
| author | Marc Jeanmougin <marc@jeanmougin.fr> | 2017-10-02 21:30:11 +0000 |
|---|---|---|
| committer | Marc Jeanmougin <marc@jeanmougin.fr> | 2017-10-02 21:30:11 +0000 |
| commit | 3e075e587aaa712efb1704478cd1a75131882889 (patch) | |
| tree | 6f13d8df9a58d9895d01b96ef1074ccce7e8fe05 /src/sp-mesh-patch.cpp | |
| parent | Merge branch 'master' of gitlab.com:inkscape/inkscape (diff) | |
| download | inkscape-3e075e587aaa712efb1704478cd1a75131882889.tar.gz inkscape-3e075e587aaa712efb1704478cd1a75131882889.zip | |
third batch
Diffstat (limited to 'src/sp-mesh-patch.cpp')
| -rw-r--r-- | src/sp-mesh-patch.cpp | 13 |
1 files changed, 3 insertions, 10 deletions
diff --git a/src/sp-mesh-patch.cpp b/src/sp-mesh-patch.cpp index 9a173a8db..04a121c7a 100644 --- a/src/sp-mesh-patch.cpp +++ b/src/sp-mesh-patch.cpp @@ -94,23 +94,16 @@ void SPMeshpatch::set(unsigned int key, const gchar* value) { void SPMeshpatch::modified(unsigned int flags) { flags &= SP_OBJECT_MODIFIED_CASCADE; - GSList *l = NULL; - + std::vector<SPObject *> 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 = SP_OBJECT(l->data); - l = g_slist_remove(l, child); - + for (auto child:l) { if (flags || (child->mflags & (SP_OBJECT_MODIFIED_FLAG | SP_OBJECT_CHILD_MODIFIED_FLAG))) { child->emitModified(flags); } - sp_object_unref(child); } } |
