From 3283bca45475a597686378f232b65d052422c6b8 Mon Sep 17 00:00:00 2001 From: David Robillard Date: Sun, 8 Dec 2019 19:23:48 +0100 Subject: Cleanup: Use faster char overload of find_last_of() --- src/server/LV2Plugin.cpp | 2 +- src/server/SocketListener.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'src/server') 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; -- cgit v1.2.1