diff options
author | Adam <Adam@anope.org> | 2013-02-15 14:22:23 -0500 |
---|---|---|
committer | Adam <Adam@anope.org> | 2013-02-15 19:01:46 -0500 |
commit | d9c18a6072521bb44418830d2ba1cda14389af20 (patch) | |
tree | 2163f6ba24b315a54a15f6419c194fc2236a1455 /include/anope.h | |
parent | 73099b82e8619a87f894a0f787a582ee973bd177 (diff) |
Store hashes of the last commit instead of the last commit
Diffstat (limited to 'include/anope.h')
-rw-r--r-- | include/anope.h | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/include/anope.h b/include/anope.h index 1b978a8ba..6878a333c 100644 --- a/include/anope.h +++ b/include/anope.h @@ -308,7 +308,7 @@ namespace Anope inline const string operator+(const char *_str, const string &str) { string tmp(_str); tmp += str; return tmp; } inline const string operator+(const std::string &_str, const string &str) { string tmp(_str); tmp += str; return tmp; } - struct hash + struct hash_ci { inline size_t operator()(const string &s) const { @@ -316,6 +316,14 @@ namespace Anope } }; + struct hash_cs + { + inline size_t operator()(const string &s) const + { + return std::tr1::hash<std::string>()(s.str()); + } + }; + struct compare { inline bool operator()(const string &s1, const string &s2) const @@ -325,7 +333,7 @@ namespace Anope }; template<typename T> class map : public std::map<string, T, ci::less> { }; - template<typename T> class hash_map : public std::tr1::unordered_map<string, T, hash, compare> { }; + template<typename T> class hash_map : public std::tr1::unordered_map<string, T, hash_ci, compare> { }; static const char *const compiled = __TIME__ " " __DATE__; |