diff options
author | Max Kellermann <max@duempel.org> | 2014-01-18 13:36:50 +0100 |
---|---|---|
committer | Max Kellermann <max@duempel.org> | 2014-01-18 13:36:50 +0100 |
commit | 55737e4ff63df685f1603eadc3105cda38b7da9b (patch) | |
tree | ba54beb753aa9cd8c5d40e6f88f5f8e129a6dbac /src/db/upnp/Util.hxx | |
parent | f3b4ddee6c9ede15ed0009651d47d260fcd12fd3 (diff) | |
download | mpd-55737e4ff63df685f1603eadc3105cda38b7da9b.tar.gz mpd-55737e4ff63df685f1603eadc3105cda38b7da9b.tar.xz mpd-55737e4ff63df685f1603eadc3105cda38b7da9b.zip |
db/upnp/Util: trimstring() constructs string from buffer
Reduce overhead by omitting the part of the buffer that consists only
of whitespace.
Diffstat (limited to '')
-rw-r--r-- | src/db/upnp/Util.hxx | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/db/upnp/Util.hxx b/src/db/upnp/Util.hxx index 08fe5f497..ba5633331 100644 --- a/src/db/upnp/Util.hxx +++ b/src/db/upnp/Util.hxx @@ -28,8 +28,9 @@ std::string caturl(const std::string& s1, const std::string& s2); -void -trimstring(std::string &s, const char *ws = " \t\n"); +gcc_pure +std::string +trimstring(const char *p, size_t length); std::string path_getfather(const std::string &s); |