From 05f2f043bdbadefa4ea435981e1a728420d6b93c Mon Sep 17 00:00:00 2001 From: Tavmjong Bah Date: Thu, 25 Dec 2014 20:30:29 +0100 Subject: Remove sp_style_new(). (bzr r13822.1.6) --- src/selection-chemistry.cpp | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'src/selection-chemistry.cpp') diff --git a/src/selection-chemistry.cpp b/src/selection-chemistry.cpp index 98ebd1f61..c9837aabe 100644 --- a/src/selection-chemistry.cpp +++ b/src/selection-chemistry.cpp @@ -2110,7 +2110,7 @@ GSList *sp_get_same_stroke_style(SPItem *sel, GSList *src, SPSelectStrokeStyleTy SPStyle *sel_style_for_width = NULL; if (type == SP_STROKE_STYLE_WIDTH) { objects = g_slist_prepend(objects, sel); - sel_style_for_width = sp_style_new (SP_ACTIVE_DOCUMENT); + sel_style_for_width = new SPStyle(SP_ACTIVE_DOCUMENT); objects_query_strokewidth (objects, sel_style_for_width); } @@ -2125,11 +2125,11 @@ GSList *sp_get_same_stroke_style(SPItem *sel, GSList *src, SPSelectStrokeStyleTy if (sel_style->stroke_width.set && iter_style->stroke_width.set) { GSList *objects = NULL; objects = g_slist_prepend(objects, iter); - SPStyle *iter_style_for_width = sp_style_new (SP_ACTIVE_DOCUMENT); - objects_query_strokewidth (objects, iter_style_for_width); + SPStyle tmp_style(SP_ACTIVE_DOCUMENT); + objects_query_strokewidth (objects, &tmp_style); if (sel_style_for_width) { - match = (sel_style_for_width->stroke_width.computed == iter_style_for_width->stroke_width.computed); + match = (sel_style_for_width->stroke_width.computed == tmp_style.stroke_width.computed); } g_slist_free(objects); } @@ -2161,6 +2161,7 @@ GSList *sp_get_same_stroke_style(SPItem *sel, GSList *src, SPSelectStrokeStyleTy } } + if( sel_style_for_width != NULL ) delete sel_style_for_width; g_slist_free(objects); return matches; -- cgit v1.2.3