diff options
author | Max Kellermann <max@musicpd.org> | 2018-01-02 13:04:11 +0100 |
---|---|---|
committer | Max Kellermann <max@musicpd.org> | 2018-01-02 14:16:57 +0100 |
commit | 7d96883d64f71596ae3eec644dcb14a72a9c67d9 (patch) | |
tree | 10182b138de70167737029a11fa706f9327b3795 | |
parent | 28c5e7e6a7512b2248200a689ab4ac4fb9857a0c (diff) |
lib/upnp/Util: use std::string::erase() instead of ..::replace()
-rw-r--r-- | src/lib/upnp/Util.cxx | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/lib/upnp/Util.cxx b/src/lib/upnp/Util.cxx index b6cd4189e..e88932b55 100644 --- a/src/lib/upnp/Util.cxx +++ b/src/lib/upnp/Util.cxx @@ -30,11 +30,11 @@ trimstring(std::string &s, const char *ws) noexcept s.clear(); return; } - s.replace(0, pos, std::string()); + s.erase(0, pos); pos = s.find_last_not_of(ws); if (pos != std::string::npos && pos != s.length()-1) - s.replace(pos + 1, std::string::npos, std::string()); + s.erase(pos + 1); } static void |