summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2019-12-08 19:23:48 +0100
committerDavid Robillard <d@drobilla.net>2019-12-08 20:59:06 +0100
commit3283bca45475a597686378f232b65d052422c6b8 (patch)
treefc29cb21214cb70900d020bfdc8783f35b399458
parent14cd32a043552d39738ae0e84e4ef8ab93783296 (diff)
downloadingen-3283bca45475a597686378f232b65d052422c6b8.tar.gz
ingen-3283bca45475a597686378f232b65d052422c6b8.tar.bz2
ingen-3283bca45475a597686378f232b65d052422c6b8.zip
Cleanup: Use faster char overload of find_last_of()
-rw-r--r--src/ClashAvoider.cpp2
-rw-r--r--src/Parser.cpp2
-rw-r--r--src/server/LV2Plugin.cpp2
-rw-r--r--src/server/SocketListener.cpp2
4 files changed, 4 insertions, 4 deletions
diff --git a/src/ClashAvoider.cpp b/src/ClashAvoider.cpp
index 1c1e4db1..83aefddd 100644
--- a/src/ClashAvoider.cpp
+++ b/src/ClashAvoider.cpp
@@ -99,7 +99,7 @@ ClashAvoider::map_path(const Raul::Path& in)
offset = ++o->second;
} else {
std::string parent_str = in.parent().base();
- parent_str = parent_str.substr(0, parent_str.find_last_of("/"));
+ parent_str = parent_str.substr(0, parent_str.find_last_of('/'));
if (parent_str.empty()) {
parent_str = "/";
}
diff --git a/src/Parser.cpp b/src/Parser.cpp
index c4661789..631d5cf4 100644
--- a/src/Parser.cpp
+++ b/src/Parser.cpp
@@ -181,7 +181,7 @@ get_port(ingen::World& world,
sym = s->second.ptr<char>();
} else {
const std::string subject_str = subject.to_string();
- const size_t last_slash = subject_str.find_last_of("/");
+ const size_t last_slash = subject_str.find_last_of('/');
sym = ((last_slash == std::string::npos)
? subject_str
diff --git a/src/server/LV2Plugin.cpp b/src/server/LV2Plugin.cpp
index 983f566c..b3aa392c 100644
--- a/src/server/LV2Plugin.cpp
+++ b/src/server/LV2Plugin.cpp
@@ -74,7 +74,7 @@ LV2Plugin::symbol() const
}
while (working.length() > 0) {
- size_t last_slash = working.find_last_of("/");
+ size_t last_slash = working.find_last_of('/');
const std::string symbol = working.substr(last_slash+1);
if ( (symbol[0] >= 'a' && symbol[0] <= 'z')
|| (symbol[0] >= 'A' && symbol[0] <= 'Z') ) {
diff --git a/src/server/SocketListener.cpp b/src/server/SocketListener.cpp
index 0853962b..ecce1649 100644
--- a/src/server/SocketListener.cpp
+++ b/src/server/SocketListener.cpp
@@ -98,7 +98,7 @@ ingen_listen(Engine* engine, Raul::Socket* unix_sock, Raul::Socket* net_sock)
} else {
const std::string old_path = get_link_target(link_path.c_str());
if (!old_path.empty()) {
- const std::string suffix = old_path.substr(old_path.find_last_of(".") + 1);
+ const std::string suffix = old_path.substr(old_path.find_last_of('.') + 1);
const pid_t pid = std::stoi(suffix);
if (!kill(pid, 0)) {
make_link = false;