From 1feedd4d9c776cb52f2404732a52447fd0fe57fa Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Wed, 22 Jan 2014 23:18:31 +0100 Subject: [PATCH] db/upnp: require an empty token list in csvToStrings() --- src/db/upnp/Util.cxx | 10 ++++------ 1 file 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 -#include -#include -#include - #include +#include + /** Get rid of white space at both ends */ void trimstring(std::string &s, const char *ws) @@ -141,8 +138,9 @@ template bool csvToStrings(const char *s, T &tokens) { + assert(tokens.empty()); + std::string current; - tokens.clear(); while (true) { char ch = *s++;