diff options
author | Attila Molnar <attilamolnar@hush.com> | 2016-08-22 16:32:51 +0200 |
---|---|---|
committer | Attila Molnar <attilamolnar@hush.com> | 2016-08-22 16:32:51 +0200 |
commit | 0612de153ff8a731992fee0d1812295cd98c6e8d (patch) | |
tree | 6015abf9fe612d7093aa7708c2bbdb3b83edd177 | |
parent | 0424d98e0e6cbf139da4209aaacfd5585308f0ba (diff) |
Remove unused irc::hash
-rw-r--r-- | include/hashcomp.h | 9 | ||||
-rw-r--r-- | src/hashcomp.cpp | 8 |
2 files changed, 0 insertions, 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(); |