From 67d61b662f9c7f8cd39ea78335efb709bade4549 Mon Sep 17 00:00:00 2001 From: Marc Jeanmougin Date: Sat, 5 Oct 2019 14:19:04 +0200 Subject: Fix various minor code problems --- src/widgets/sp-xmlview-tree.cpp | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'src/widgets/sp-xmlview-tree.cpp') diff --git a/src/widgets/sp-xmlview-tree.cpp b/src/widgets/sp-xmlview-tree.cpp index fa8b6745e..5e3ba0859 100644 --- a/src/widgets/sp-xmlview-tree.cpp +++ b/src/widgets/sp-xmlview-tree.cpp @@ -313,19 +313,17 @@ void element_order_changed(Inkscape::XML::Node * /*repr*/, Inkscape::XML::Node * Glib::ustring sp_remove_newlines_and_tabs(Glib::ustring val) { - int pos = 0; + int pos; Glib::ustring newlinesign = "␤"; Glib::ustring tabsign = "⇥"; while ((pos = val.find("\r\n")) != std::string::npos) { val.erase(pos, 2); val.insert(pos, newlinesign); } - pos = 0; while ((pos = val.find('\n')) != std::string::npos) { val.erase(pos, 1); val.insert(pos, newlinesign); } - pos = 0; while ((pos = val.find('\t')) != std::string::npos) { val.erase(pos, 1); val.insert(pos, tabsign); -- cgit v1.2.3