summaryrefslogtreecommitdiffstats
path: root/src/ui/tools/pencil-tool.cpp
diff options
context:
space:
mode:
authorMarc Jeanmougin <marc@jeanmougin.fr>2017-10-01 15:49:26 +0000
committerMarc Jeanmougin <marc@jeanmougin.fr>2017-10-01 15:49:26 +0000
commite0957537cd0938313803c290a2f3922a3889e6f1 (patch)
tree7f158d00a7655ee91ac094f676f6b3bd624a78b7 /src/ui/tools/pencil-tool.cpp
parentMerge branch 'master' of gitlab.com:inkscape/inkscape (diff)
downloadinkscape-e0957537cd0938313803c290a2f3922a3889e6f1.tar.gz
inkscape-e0957537cd0938313803c290a2f3922a3889e6f1.zip
Removed all GSList occurences in .h files
Diffstat (limited to 'src/ui/tools/pencil-tool.cpp')
-rw-r--r--src/ui/tools/pencil-tool.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/ui/tools/pencil-tool.cpp b/src/ui/tools/pencil-tool.cpp
index 99b8103c3..61799b306 100644
--- a/src/ui/tools/pencil-tool.cpp
+++ b/src/ui/tools/pencil-tool.cpp
@@ -437,10 +437,10 @@ void PencilTool::_cancel() {
this->red_curve->reset();
sp_canvas_bpath_set_bpath(SP_CANVAS_BPATH(this->red_bpath), NULL);
- while (this->green_bpaths) {
- sp_canvas_item_destroy(SP_CANVAS_ITEM(this->green_bpaths->data));
- this->green_bpaths = g_slist_remove(this->green_bpaths, this->green_bpaths->data);
+ for (auto i:this->green_bpaths) {
+ sp_canvas_item_destroy(i);
}
+ this->green_bpaths.clear();
this->green_curve->reset();
if (this->green_anchor) {
this->green_anchor = sp_draw_anchor_destroy(this->green_anchor);
@@ -858,7 +858,7 @@ void PencilTool::_fitAndSplit() {
}
sp_canvas_bpath_set_stroke(SP_CANVAS_BPATH(cshape), this->green_color, 1.0, SP_STROKE_LINEJOIN_MITER, SP_STROKE_LINECAP_BUTT);
- this->green_bpaths = g_slist_prepend(this->green_bpaths, cshape);
+ this->green_bpaths.push_back(cshape);
this->red_curve_is_valid = false;
}