diff options
author | Naram Qashat <cyberbotx@cyberbotx.com> | 2010-07-30 19:24:41 -0400 |
---|---|---|
committer | Naram Qashat <cyberbotx@cyberbotx.com> | 2010-07-30 19:24:41 -0400 |
commit | 7a7b8933bbf15d1aeeb4a58895013fa73383ca2e (patch) | |
tree | ac29081066fb7adeebbd4017f0b7e762a54c417a /include/hashcomp.h | |
parent | a68e215bad844568550afcb12f9516d054c61eb5 (diff) |
Cleanup in modulemanager.cpp, make it so CMake only includes the -fno-leading-underscore flag on a GNU compiler, changed the hash compare functions to use struct to appease clang, and made it so hashcomp.h uses tr1/unordered_map with g++ 4.x or up.
Diffstat (limited to 'include/hashcomp.h')
-rw-r--r-- | include/hashcomp.h | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/include/hashcomp.h b/include/hashcomp.h index 9dc992fd0..84e4bcf0b 100644 --- a/include/hashcomp.h +++ b/include/hashcomp.h @@ -34,7 +34,7 @@ namespace Anope } #ifndef _WIN32 -# ifndef USE_HASHMAP +# if defined(__GNUC__) && __GNUC__ >= 4 /* GCC4.3+ has deprecated hash_map and uses tr1. But of course, uses a different include to MSVC. */ # include <tr1/unordered_map> # define unordered_map_namespace std::tr1 @@ -262,7 +262,7 @@ namespace std /** An overload for std::equal_to<ci::string> that uses Anope::string, passed for the fourth temmplate * argument for unordered_map */ - template<> class CoreExport equal_to<ci::string> + template<> struct CoreExport equal_to<ci::string> { public: /** Compare two Anope::strings as ci::strings @@ -276,7 +276,7 @@ namespace std /** An overload for std::equal_to<irc::string> that uses Anope::string, passed for the fourth template * argument for unorderd_map */ - template<> class CoreExport equal_to<irc::string> + template<> struct CoreExport equal_to<irc::string> { public: /** Compare two Anope::strings as irc::strings @@ -290,9 +290,9 @@ namespace std /** An overload for std::less<ci::string> that uses Anope::string, passed for the third template argument * to std::map and std::multimap */ - template<> class CoreExport less<ci::string> + template<> struct CoreExport less<ci::string> { - public: + public: /** Compare two Anope::strings as ci::strings and find which one is less * @param s1 The first string * @param s2 The second string @@ -304,7 +304,7 @@ namespace std /** An overload for std;:less<irc::string> that uses Anope::string, passed for the third tempalte argument * to std::map and std::multimap */ - template<> class CoreExport less<irc::string> + template<> struct CoreExport less<irc::string> { public: /** Compare two Anope::strings as irc::strings and find which one is less |