diff options
author | Adam <adam@sigterm.info> | 2012-10-12 14:50:05 -0700 |
---|---|---|
committer | Adam <adam@sigterm.info> | 2012-10-12 14:50:05 -0700 |
commit | c05ad37bfd03486475889485606ed5cffc7bf5a2 (patch) | |
tree | fe01825889769500a0f080371a0714aa15505b9a /src/hashcomp.cpp | |
parent | e496d321efe3e9b27f2f116bd22a05ec44aec564 (diff) | |
parent | 5b9682275e384635a1fd9f7320cf4d9a604a43b4 (diff) |
Merge pull request #320 from ChrisTX/insp20+cleanupwin
Windows: In-depth cleanup (see details)
Diffstat (limited to 'src/hashcomp.cpp')
-rw-r--r-- | src/hashcomp.cpp | 17 |
1 files changed, 5 insertions, 12 deletions
diff --git a/src/hashcomp.cpp b/src/hashcomp.cpp index 2cb6fb972..8a7f8987b 100644 --- a/src/hashcomp.cpp +++ b/src/hashcomp.cpp @@ -127,15 +127,12 @@ void nspace::strlower(char *n) } } -#if defined(WINDOWS) && !defined(HASHMAP_DEPRECATED) - size_t nspace::hash_compare<std::string, std::less<std::string> >::operator()(const std::string &s) const +#ifdef HASHMAP_DEPRECATED + size_t CoreExport nspace::insensitive::operator()(const std::string &s) const #else - #ifdef HASHMAP_DEPRECATED - size_t CoreExport nspace::insensitive::operator()(const std::string &s) const - #else - size_t nspace::hash<std::string>::operator()(const std::string &s) const - #endif + size_t nspace::hash<std::string>::operator()(const std::string &s) const #endif + { /* XXX: NO DATA COPIES! :) * The hash function here is practically @@ -150,11 +147,7 @@ void nspace::strlower(char *n) } -#if defined(WINDOWS) && !defined(HASHMAP_DEPRECATED) - size_t nspace::hash_compare<irc::string, std::less<irc::string> >::operator()(const irc::string &s) const -#else - size_t CoreExport irc::hash::operator()(const irc::string &s) const -#endif +size_t CoreExport irc::hash::operator()(const irc::string &s) const { register size_t t = 0; for (irc::string::const_iterator x = s.begin(); x != s.end(); ++x) /* ++x not x++, as its faster */ |