From 7d96883d64f71596ae3eec644dcb14a72a9c67d9 Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Tue, 2 Jan 2018 13:04:11 +0100 Subject: [PATCH] lib/upnp/Util: use std::string::erase() instead of ..::replace() --- src/lib/upnp/Util.cxx | 4 ++-- 1 file 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