db/upnp: require an empty token list in csvToStrings()
This commit is contained in:
parent
0ec1808956
commit
1feedd4d9c
|
@ -19,13 +19,10 @@
|
||||||
|
|
||||||
#include "Util.hxx"
|
#include "Util.hxx"
|
||||||
|
|
||||||
#include <string>
|
|
||||||
#include <map>
|
|
||||||
#include <vector>
|
|
||||||
#include <set>
|
|
||||||
|
|
||||||
#include <upnp/ixml.h>
|
#include <upnp/ixml.h>
|
||||||
|
|
||||||
|
#include <assert.h>
|
||||||
|
|
||||||
/** Get rid of white space at both ends */
|
/** Get rid of white space at both ends */
|
||||||
void
|
void
|
||||||
trimstring(std::string &s, const char *ws)
|
trimstring(std::string &s, const char *ws)
|
||||||
|
@ -141,8 +138,9 @@ template <class T>
|
||||||
bool
|
bool
|
||||||
csvToStrings(const char *s, T &tokens)
|
csvToStrings(const char *s, T &tokens)
|
||||||
{
|
{
|
||||||
|
assert(tokens.empty());
|
||||||
|
|
||||||
std::string current;
|
std::string current;
|
||||||
tokens.clear();
|
|
||||||
|
|
||||||
while (true) {
|
while (true) {
|
||||||
char ch = *s++;
|
char ch = *s++;
|
||||||
|
|
Loading…
Reference in New Issue