diff options
author | David Robillard <d@drobilla.net> | 2024-10-06 16:32:41 -0400 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2024-10-06 18:40:03 -0400 |
commit | 5fe9b2cd3e7ff8f7f23075c980e36d7d456788a8 (patch) | |
tree | c62f1bfc0046ae9a952df2e32f5d23c6aed24a6c /src/client | |
parent | 45bd400f71e574bfa2670f13f7c1611ab2089903 (diff) | |
download | ingen-5fe9b2cd3e7ff8f7f23075c980e36d7d456788a8.tar.gz ingen-5fe9b2cd3e7ff8f7f23075c980e36d7d456788a8.tar.bz2 ingen-5fe9b2cd3e7ff8f7f23075c980e36d7d456788a8.zip |
Avoid inefficient use of substr() to set strings to a prefix
Diffstat (limited to 'src/client')
-rw-r--r-- | src/client/PluginModel.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/client/PluginModel.cpp b/src/client/PluginModel.cpp index 333bf568..3036f2e8 100644 --- a/src/client/PluginModel.cpp +++ b/src/client/PluginModel.cpp @@ -103,7 +103,7 @@ PluginModel::get_property(const URI& key) const size_t last_delim = last_uri_delim(str); while (last_delim != string::npos && !contains_alpha_after(str, last_delim)) { - str = str.substr(0, last_delim); + str.resize(last_delim); last_delim = last_uri_delim(str); } str = str.substr(last_delim + 1); |