lib/upnp/Util: remove unused function csvToStrings()

This commit is contained in:
Max Kellermann 2018-01-02 13:12:40 +01:00
parent cdf615f783
commit 8c7d7dfa5b
2 changed files with 0 additions and 35 deletions

View File

@ -102,34 +102,3 @@ stringToTokens(const std::string &str,
return tokens; return tokens;
} }
template <class T>
bool
csvToStrings(const char *s, T &tokens) noexcept
{
assert(tokens.empty());
std::string current;
while (true) {
char ch = *s++;
if (ch == 0) {
tokens.emplace_back(std::move(current));
return true;
}
if (ch == '\\') {
ch = *s++;
if (ch == 0)
return false;
} else if (ch == ',') {
tokens.emplace_back(std::move(current));
current.clear();
continue;
}
current.push_back(ch);
}
}
template bool csvToStrings<std::list<std::string>>(const char *, std::list<std::string> &) noexcept;

View File

@ -35,8 +35,4 @@ gcc_pure
std::list<std::string> std::list<std::string>
stringToTokens(const std::string &str, char delim) noexcept; stringToTokens(const std::string &str, char delim) noexcept;
template <class T>
bool
csvToStrings(const char *s, T &tokens) noexcept;
#endif /* _UPNPP_H_X_INCLUDED_ */ #endif /* _UPNPP_H_X_INCLUDED_ */