aboutsummaryrefslogtreecommitdiffstats
path: root/src/db/upnp
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2014-01-22 23:18:31 +0100
committerMax Kellermann <max@duempel.org>2014-01-22 23:21:14 +0100
commit1feedd4d9c776cb52f2404732a52447fd0fe57fa (patch)
treec4fceb0179f1e983afabd87b5067408c8b0d0774 /src/db/upnp
parent0ec1808956ac6eaa08973a4ad609ce99bde4e6d3 (diff)
downloadmpd-1feedd4d9c776cb52f2404732a52447fd0fe57fa.tar.gz
mpd-1feedd4d9c776cb52f2404732a52447fd0fe57fa.tar.xz
mpd-1feedd4d9c776cb52f2404732a52447fd0fe57fa.zip
db/upnp: require an empty token list in csvToStrings()
Diffstat (limited to 'src/db/upnp')
-rw-r--r--src/db/upnp/Util.cxx10
1 files changed, 4 insertions, 6 deletions
diff --git a/src/db/upnp/Util.cxx b/src/db/upnp/Util.cxx
index 0fd0d03db..b316b362b 100644
--- a/src/db/upnp/Util.cxx
+++ b/src/db/upnp/Util.cxx
@@ -19,13 +19,10 @@
#include "Util.hxx"
-#include <string>
-#include <map>
-#include <vector>
-#include <set>
-
#include <upnp/ixml.h>
+#include <assert.h>
+
/** Get rid of white space at both ends */
void
trimstring(std::string &s, const char *ws)
@@ -141,8 +138,9 @@ template <class T>
bool
csvToStrings(const char *s, T &tokens)
{
+ assert(tokens.empty());
+
std::string current;
- tokens.clear();
while (true) {
char ch = *s++;