summaryrefslogtreecommitdiffstats
path: root/src/gui
diff options
context:
space:
mode:
Diffstat (limited to 'src/gui')
-rw-r--r--src/gui/GraphCanvas.cpp2
-rw-r--r--src/gui/LoadGraphWindow.cpp2
2 files changed, 2 insertions, 2 deletions
diff --git a/src/gui/GraphCanvas.cpp b/src/gui/GraphCanvas.cpp
index 6d5c3b5a..2c08fb47 100644
--- a/src/gui/GraphCanvas.cpp
+++ b/src/gui/GraphCanvas.cpp
@@ -735,7 +735,7 @@ GraphCanvas::paste()
if (base_uri) {
std::string base = *base_uri;
if (base[base.size() - 1] == '/') {
- base = base.substr(0, base.size() - 1);
+ base.resize(base.size() - 1);
}
copy_root = uri_to_path(URI(base));
}
diff --git a/src/gui/LoadGraphWindow.cpp b/src/gui/LoadGraphWindow.cpp
index 794cfe71..b118effb 100644
--- a/src/gui/LoadGraphWindow.cpp
+++ b/src/gui/LoadGraphWindow.cpp
@@ -237,7 +237,7 @@ raul::Symbol
LoadGraphWindow::symbol_from_filename(const Glib::ustring& filename)
{
std::string symbol_str = Glib::path_get_basename(get_filename());
- symbol_str = symbol_str.substr(0, symbol_str.find('.'));
+ symbol_str.resize(symbol_str.find('.'));
return raul::Symbol::symbolify(symbol_str);
}