summaryrefslogtreecommitdiff
path: root/src/hashcomp.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/hashcomp.cpp')
-rw-r--r--src/hashcomp.cpp18
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