From 9bbf7d5063006d3c81b7acee6d37fe30ecc67bda Mon Sep 17 00:00:00 2001 From: "Johan B. C. Engelen" Date: Tue, 25 Nov 2014 22:10:16 +0100 Subject: More C++ string usage. (bzr r13762) --- src/selection-chemistry.cpp | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'src/selection-chemistry.cpp') diff --git a/src/selection-chemistry.cpp b/src/selection-chemistry.cpp index ca39ca4c7..bedce4e94 100644 --- a/src/selection-chemistry.cpp +++ b/src/selection-chemistry.cpp @@ -2910,7 +2910,7 @@ void sp_selection_clone_original_path_lpe(SPDesktop *desktop) lpe_repr->setAttribute("linkedpaths", os.str().c_str()); desktop->doc()->getDefs()->getRepr()->addChild(lpe_repr, NULL); // adds to and assigns the 'id' attribute } - const gchar * lpe_id = lpe_repr->attribute("id"); + std::string lpe_id_href = '#' + lpe_repr->attribute("id"); Inkscape::GC::release(lpe_repr); // create the new path @@ -2922,9 +2922,7 @@ void sp_selection_clone_original_path_lpe(SPDesktop *desktop) SPObject *clone_obj = desktop->doc()->getObjectById(clone->attribute("id")); SPLPEItem *clone_lpeitem = dynamic_cast(clone_obj); if (clone_lpeitem) { - gchar *href = g_strdup_printf("#%s", lpe_id); - clone_lpeitem->addPathEffect(href, false); - g_free(href); + clone_lpeitem->addPathEffect(lpe_id_href, false); } } -- cgit v1.2.3