aboutsummaryrefslogtreecommitdiffstats
path: root/src/db/upnp/Device.cxx
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2014-01-18 13:36:50 +0100
committerMax Kellermann <max@duempel.org>2014-01-18 13:36:50 +0100
commit55737e4ff63df685f1603eadc3105cda38b7da9b (patch)
treeba54beb753aa9cd8c5d40e6f88f5f8e129a6dbac /src/db/upnp/Device.cxx
parentf3b4ddee6c9ede15ed0009651d47d260fcd12fd3 (diff)
downloadmpd-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/Device.cxx3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/db/upnp/Device.cxx b/src/db/upnp/Device.cxx
index 37d68c232..c947f5a14 100644
--- a/src/db/upnp/Device.cxx
+++ b/src/db/upnp/Device.cxx
@@ -56,8 +56,7 @@ protected:
}
virtual void CharacterData(const XML_Char *s, int len) {
- std::string str(s, len);
- trimstring(str);
+ std::string str = trimstring(s, len);
switch (m_path.back()[0]) {
case 'c':
if (!m_path.back().compare("controlURL"))