X-Git-Url: https://git.netwichtig.de/gitweb/?a=blobdiff_plain;f=src%2Fhashcomp.cpp;h=3f3754884b7d5abb1c7fae9c2528db96734301f2;hb=55dc6fe9e5a8944c5113ae55ea62a140ba47a40c;hp=06b3ce66970e8bfba9e5e99e7227f5702b90d18c;hpb=fdac3263c0ee8423bac88007af19f4873986ae26;p=user%2Fhenk%2Fcode%2Finspircd.git diff --git a/src/hashcomp.cpp b/src/hashcomp.cpp index 06b3ce669..3f3754884 100644 --- a/src/hashcomp.cpp +++ b/src/hashcomp.cpp @@ -397,14 +397,14 @@ int irc::modestacker::GetStackedLine(std::vector &result, int max_l return n; } -irc::stringjoiner::stringjoiner(const std::string& separator, const std::vector& sequence, unsigned int begin, unsigned int end) +irc::stringjoiner::stringjoiner(const std::vector& sequence) { - if (end < begin) + if (sequence.empty()) return; // nothing to do here - for (unsigned int v = begin; v < end; v++) - joined.append(sequence[v]).append(separator); - joined.append(sequence[end]); + for (std::vector::const_iterator i = sequence.begin(); i != sequence.end(); ++i) + joined.append(*i).push_back(' '); + joined.erase(joined.end()-1); } irc::portparser::portparser(const std::string &source, bool allow_overlapped)