summaryrefslogtreecommitdiffstats
path: root/src/widgets/sp-xmlview-tree.cpp
diff options
context:
space:
mode:
authorMarc Jeanmougin <marc@jeanmougin.fr>2019-10-05 12:19:04 +0000
committerMarc Jeanmougin <marc@jeanmougin.fr>2019-10-05 12:19:04 +0000
commit67d61b662f9c7f8cd39ea78335efb709bade4549 (patch)
tree1df7203973194293cb2e338fed03094b746fd502 /src/widgets/sp-xmlview-tree.cpp
parentMatch default for star tool and star toolbar (diff)
downloadinkscape-67d61b662f9c7f8cd39ea78335efb709bade4549.tar.gz
inkscape-67d61b662f9c7f8cd39ea78335efb709bade4549.zip
Fix various minor code problems
Diffstat (limited to 'src/widgets/sp-xmlview-tree.cpp')
-rw-r--r--src/widgets/sp-xmlview-tree.cpp4
1 files changed, 1 insertions, 3 deletions
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);