From 0612de153ff8a731992fee0d1812295cd98c6e8d Mon Sep 17 00:00:00 2001 From: Attila Molnar Date: Mon, 22 Aug 2016 16:32:51 +0200 Subject: Remove unused irc::hash --- include/hashcomp.h | 9 --------- src/hashcomp.cpp | 8 -------- 2 files changed, 17 deletions(-) diff --git a/include/hashcomp.h b/include/hashcomp.h index 7f6956bfc..5b2c7215e 100644 --- a/include/hashcomp.h +++ b/include/hashcomp.h @@ -337,15 +337,6 @@ namespace irc */ long GetToken(); }; - - struct hash - { - /** Hash an irc::string using RFC1459 case sensitivity rules - * @param s A string to hash - * @return The hash value - */ - size_t CoreExport operator()(const irc::string &s) const; - }; } /* Define operators for using >> and << with irc::string to an ostream on an istream. */ diff --git a/src/hashcomp.cpp b/src/hashcomp.cpp index 35e5f3671..36a6aabc9 100644 --- a/src/hashcomp.cpp +++ b/src/hashcomp.cpp @@ -151,14 +151,6 @@ unsigned const char rfc_case_sensitive_map[256] = { 250, 251, 252, 253, 254, 255, // 250-255 }; -size_t CoreExport irc::hash::operator()(const irc::string &s) const -{ - size_t t = 0; - for (irc::string::const_iterator x = s.begin(); x != s.end(); ++x) /* ++x not x++, as its faster */ - t = 5 * t + national_case_insensitive_map[(unsigned char)*x]; - return t; -} - bool irc::StrHashComp::operator()(const std::string& s1, const std::string& s2) const { const unsigned char* n1 = (const unsigned char*)s1.c_str(); -- cgit v1.3.1-10-gc9f91