From e0957537cd0938313803c290a2f3922a3889e6f1 Mon Sep 17 00:00:00 2001 From: Marc Jeanmougin Date: Sun, 1 Oct 2017 17:49:26 +0200 Subject: Removed all GSList occurences in .h files --- src/path-chemistry.cpp | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) (limited to 'src/path-chemistry.cpp') diff --git a/src/path-chemistry.cpp b/src/path-chemistry.cpp index 7840c4ca8..043d47517 100644 --- a/src/path-chemistry.cpp +++ b/src/path-chemistry.cpp @@ -237,13 +237,12 @@ ObjectSet::breakApart(bool skip_undo) item->deleteObject(false); - GSList *list = curve->split(); + std::list list = curve->split(); curve->unref(); std::vector reprs; - for (GSList *l = list; l != NULL; l = l->next) { - curve = (SPCurve *) l->data; + for (auto curve:list) { Inkscape::XML::Node *repr = parent->document()->createElement("svg:path"); repr->setAttribute("style", style); @@ -266,7 +265,7 @@ ObjectSet::breakApart(bool skip_undo) repr->setPosition(pos > 0 ? pos : 0); // if it's the first one, restore id - if (l == list) + if (curve == *(list.begin())) repr->setAttribute("id", id); reprs.push_back(repr); @@ -275,7 +274,6 @@ ObjectSet::breakApart(bool skip_undo) } setReprList(reprs); - g_slist_free(list); g_free(style); g_free(path_effect); } -- cgit v1.2.3