diff options
| author | 2018-07-26 21:23:45 +0100 | |
|---|---|---|
| committer | 2018-07-26 21:41:36 +0100 | |
| commit | 9cf448a332799a138dad0acb5b2878535770571d (patch) | |
| tree | 4d922164f102e1dbf98aa3261e77da305664f532 /src/inspstring.cpp | |
| parent | Use CommandBase::Params instead of std::vector<std::string>. (diff) | |
| download | inspircd++-9cf448a332799a138dad0acb5b2878535770571d.tar.gz inspircd++-9cf448a332799a138dad0acb5b2878535770571d.tar.bz2 inspircd++-9cf448a332799a138dad0acb5b2878535770571d.zip | |
Replace irc::stringjoiner with a generic stdalgo::string::join.
This can also be used with different types of collection containing
values which are not a string.
Diffstat (limited to 'src/inspstring.cpp')
| -rw-r--r-- | src/inspstring.cpp | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/src/inspstring.cpp b/src/inspstring.cpp index 283c00d5b..79aef52bd 100644 --- a/src/inspstring.cpp +++ b/src/inspstring.cpp @@ -206,12 +206,8 @@ void TokenList::Remove(const std::string& token) std::string TokenList::ToString() const { - std::string buffer(permissive ? "*" : "-*"); - for (insp::flat_set<std::string>::const_iterator iter = tokens.begin(); iter != tokens.end(); ++iter) - { - buffer.push_back(' '); - buffer.append(*iter); - } + std::string buffer(permissive ? "* " : "-* "); + buffer.append(stdalgo::string::join(tokens)); return buffer; } |
