]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/hashcomp.cpp
ISupportManager: Tidy-up, expand comments
[user/henk/code/inspircd.git] / src / hashcomp.cpp
index 4ddf942eae028a8ce327d3a6e65952f7e9239c49..1d37c2a80e7858370b9f37116ade3b78475ccbb1 100644 (file)
@@ -245,10 +245,6 @@ irc::tokenstream::tokenstream(const std::string &source) : tokens(source), last_
        n = tokens.begin();
 }
 
-irc::tokenstream::~tokenstream()
-{
-}
-
 bool irc::tokenstream::GetToken(std::string &token)
 {
        std::string::iterator lsp = last_starting_position;
@@ -361,31 +357,6 @@ bool irc::sepstream::StreamEnd()
        return ((n + 1) == tokens.end());
 }
 
-irc::sepstream::~sepstream()
-{
-}
-
-std::string irc::hex(const unsigned char *raw, size_t rawsz)
-{
-       if (!rawsz)
-               return "";
-
-       /* EWW! This used to be using sprintf, which is WAY inefficient. -Special */
-
-       const char *hex = "0123456789abcdef";
-       static char hexbuf[MAXBUF];
-
-       size_t i, j;
-       for (i = 0, j = 0; j < rawsz; ++j)
-       {
-               hexbuf[i++] = hex[raw[j] / 16];
-               hexbuf[i++] = hex[raw[j] % 16];
-       }
-       hexbuf[i] = 0;
-
-       return hexbuf;
-}
-
 irc::modestacker::modestacker(bool add) : adding(add)
 {
        sequence.clear();
@@ -451,41 +422,16 @@ int irc::modestacker::GetStackedLine(std::vector<std::string> &result, int max_l
        return n;
 }
 
-irc::stringjoiner::stringjoiner(const std::string &seperator, const std::vector<std::string> &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 std::deque<std::string> &sequence, int begin, int end)
+irc::stringjoiner::stringjoiner(const std::string& seperator, const std::vector<std::string>& 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 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()
-{
-       return joined;
-}
-
 irc::portparser::portparser(const std::string &source, bool allow_overlapped)
        : sep(source), in_range(0), range_begin(0), range_end(0), overlapped(allow_overlapped)
 {