diff options
author | Max Kellermann <max@duempel.org> | 2014-01-22 23:18:31 +0100 |
---|---|---|
committer | Max Kellermann <max@duempel.org> | 2014-01-22 23:21:14 +0100 |
commit | 1feedd4d9c776cb52f2404732a52447fd0fe57fa (patch) | |
tree | c4fceb0179f1e983afabd87b5067408c8b0d0774 | |
parent | 0ec1808956ac6eaa08973a4ad609ce99bde4e6d3 (diff) | |
download | mpd-1feedd4d9c776cb52f2404732a52447fd0fe57fa.tar.gz mpd-1feedd4d9c776cb52f2404732a52447fd0fe57fa.tar.xz mpd-1feedd4d9c776cb52f2404732a52447fd0fe57fa.zip |
db/upnp: require an empty token list in csvToStrings()
-rw-r--r-- | src/db/upnp/Util.cxx | 10 |
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++; |