From 21eba8e86b3d7361bc9334b4e15e968ba095db76 Mon Sep 17 00:00:00 2001 From: attilamolnar Date: Thu, 16 May 2013 15:45:05 +0200 Subject: irc::stringjoiner cleanup - Get rid of unused constructors - signed -> unsigned - return const ref from GetJoined() --- src/hashcomp.cpp | 26 +++----------------------- 1 file changed, 3 insertions(+), 23 deletions(-) (limited to 'src/hashcomp.cpp') diff --git a/src/hashcomp.cpp b/src/hashcomp.cpp index a2f99b70c..9fded8b4b 100644 --- a/src/hashcomp.cpp +++ b/src/hashcomp.cpp @@ -430,37 +430,17 @@ int irc::modestacker::GetStackedLine(std::vector &result, int max_l return n; } -irc::stringjoiner::stringjoiner(const std::string &seperator, const std::vector &sequence, int begin, int end) +irc::stringjoiner::stringjoiner(const std::string& seperator, const std::vector& sequence, unsigned int begin, unsigned int end) { if (end < begin) return; // nothing to do here - for (int v = begin; v < end; v++) + for (unsigned int v = begin; v < end; v++) joined.append(sequence[v]).append(seperator); joined.append(sequence[end]); } -irc::stringjoiner::stringjoiner(const std::string &seperator, const std::deque &sequence, int begin, int end) -{ - if (end < begin) - return; // nothing to do here - - for (int v = begin; v < end; v++) - joined.append(sequence[v]).append(seperator); - joined.append(sequence[end]); -} - -irc::stringjoiner::stringjoiner(const std::string &seperator, const char* const* sequence, int begin, int end) -{ - if (end < begin) - return; // nothing to do here - - for (int v = begin; v < end; v++) - joined.append(sequence[v]).append(seperator); - joined.append(sequence[end]); -} - -std::string& irc::stringjoiner::GetJoined() +const std::string& irc::stringjoiner::GetJoined() const { return joined; } -- cgit v1.3.1-10-gc9f91