lib/upnp/Util: use std::string::erase() instead of ..::replace()
This commit is contained in:
parent
28c5e7e6a7
commit
7d96883d64
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user