diff options
author | Adam <Adam@anope.org> | 2010-07-30 03:56:14 -0400 |
---|---|---|
committer | Adam <Adam@anope.org> | 2010-07-30 03:56:14 -0400 |
commit | 0cacbf30d294b61f8a001d01a6dfc300ce797132 (patch) | |
tree | 1cb8aca06cf78a4cee8d1f95899286d05185603b /src | |
parent | 8e6fe991810985fea085a4ace0ee906e80e7cbd1 (diff) |
Fixed hash_map code to build on VS 2008
Diffstat (limited to 'src')
-rw-r--r-- | src/hashcomp.cpp | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/src/hashcomp.cpp b/src/hashcomp.cpp index 129f38e07..5f65738ea 100644 --- a/src/hashcomp.cpp +++ b/src/hashcomp.cpp @@ -25,6 +25,12 @@ * ascii_case_insensitive_map * */ + +/* VS 2008 specific function */ +bool Anope::hash::operator()(const Anope::string &s1, const Anope::string &s2) const +{ + return s1.str().compare(s2.str()) < 0; +} /** Hash an Anope::string for unordered_map * @param s The string @@ -81,6 +87,12 @@ const char *irc::irc_char_traits::find(const char *s1, int n, char c) return n >= 0 ? s1 : NULL; } +/* VS 2008 specific function */ +bool irc::hash::operator()(const Anope::string &s1, const Anope::string &s2) const +{ + return s1.irc_str().compare(s2.irc_str()) < 0; +} + /** Hash an irc::string for unordered_map * @param s The string * @return A hash value for the string @@ -141,6 +153,12 @@ const char *ci::ci_char_traits::find(const char *s1, int n, char c) return n >= 0 ? s1 : NULL; } +/* VS 2008 specific function */ +bool ci::hash::operator()(const Anope::string &s1, const Anope::string &s2) const +{ + return s1.ci_str().compare(s2.ci_str()) < 0; +} + /** Hash a ci::string for unordered_map * @param s The string * @return A hash value for the string |