]> git.netwichtig.de Git - user/henk/code/inspircd.git/commitdiff
Remove unused irc::hash
authorAttila Molnar <attilamolnar@hush.com>
Mon, 22 Aug 2016 14:32:51 +0000 (16:32 +0200)
committerAttila Molnar <attilamolnar@hush.com>
Mon, 22 Aug 2016 14:32:51 +0000 (16:32 +0200)
include/hashcomp.h
src/hashcomp.cpp

index 7f6956bfcf7e2e6aa746cbfc3de8d3097e056c3a..5b2c7215ea9207dd1deed68eb51be6b40a6f7572 100644 (file)
@@ -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. */
index 35e5f3671cec15aa37c1387bfc460a6eaf54eb76..36a6aabc9de80e26e76235fe1938d97d5f7871d4 100644 (file)
@@ -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();