mirror of
https://github.com/anope/anope.git
synced 2026-06-29 21:26:38 +02:00
Fixed hash_map code to build on VS 2008
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user