summaryrefslogtreecommitdiffstats
path: root/src/gui
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2020-08-01 13:54:56 +0200
committerDavid Robillard <d@drobilla.net>2020-08-02 01:48:48 +0200
commitce23400cbd8cbe8c6a8712ae2ecf88d1053ebc99 (patch)
treeb1186212584e894f9d561ca142d96ae359584f2e /src/gui
parentf1b413575db521af0ad2017bbc4d348495a31d8b (diff)
downloadingen-ce23400cbd8cbe8c6a8712ae2ecf88d1053ebc99.tar.gz
ingen-ce23400cbd8cbe8c6a8712ae2ecf88d1053ebc99.tar.bz2
ingen-ce23400cbd8cbe8c6a8712ae2ecf88d1053ebc99.zip
Use faster variant of std::string::find
Diffstat (limited to 'src/gui')
-rw-r--r--src/gui/BreadCrumbs.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/gui/BreadCrumbs.cpp b/src/gui/BreadCrumbs.cpp
index 33b2c4b3..d641f5ac 100644
--- a/src/gui/BreadCrumbs.cpp
+++ b/src/gui/BreadCrumbs.cpp
@@ -92,16 +92,16 @@ BreadCrumbs::build(Raul::Path path, SPtr<GraphView> view)
if (suffix[0] == '/') {
suffix = suffix.substr(1);
}
- const string name = suffix.substr(0, suffix.find("/"));
+ const string name = suffix.substr(0, suffix.find('/'));
_full_path = _full_path.child(Raul::Symbol(name));
BreadCrumb* but = create_crumb(_full_path, view);
pack_start(*but, false, false, 1);
_breadcrumbs.push_back(but);
but->show();
- if (suffix.find("/") == string::npos) {
+ if (suffix.find('/') == string::npos) {
break;
} else {
- suffix = suffix.substr(suffix.find("/")+1);
+ suffix = suffix.substr(suffix.find('/') + 1);
}
}
@@ -135,17 +135,17 @@ BreadCrumbs::build(Raul::Path path, SPtr<GraphView> view)
if (suffix[0] == '/') {
suffix = suffix.substr(1);
}
- const string name = suffix.substr(0, suffix.find("/"));
+ const string name = suffix.substr(0, suffix.find('/'));
working_path = working_path.child(Raul::Symbol(name));
BreadCrumb* but = create_crumb(working_path, view);
pack_start(*but, false, false, 1);
_breadcrumbs.push_back(but);
but->set_active(working_path == _active_path);
but->show();
- if (suffix.find("/") == string::npos) {
+ if (suffix.find('/') == string::npos) {
break;
} else {
- suffix = suffix.substr(suffix.find("/")+1);
+ suffix = suffix.substr(suffix.find('/')+1);
}
}
}