summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--include/hash_map.h6
-rw-r--r--include/hashcomp.h7
2 files changed, 10 insertions, 3 deletions
diff --git a/include/hash_map.h b/include/hash_map.h
index 345420fc2..3665d9b1a 100644
--- a/include/hash_map.h
+++ b/include/hash_map.h
@@ -22,16 +22,22 @@
#include <ext/hash_map>
/** Oddball linux namespace for hash_map */
#define nspace __gnu_cxx
+ #define BEGIN_HASHMAP_NAMESPACE namespace nspace {
+ #define END_HASHMAP_NAMESPACE }
#else
#include <tr1/unordered_map>
#define hash_map unordered_map
#define nspace std::tr1
+ #define BEGIN_HASHMAP_NAMESPACE namespace std { namespace tr1 {
+ #define END_HASHMAP_NAMESPACE } }
#endif
#else
#include <hash_map>
#define nspace stdext
/** Oddball windows namespace for hash_map */
using stdext::hash_map;
+ #define BEGIN_HASHMAP_NAMESPACE namespace nspace {
+ #define END_HASHMAP_NAMESPACE }
#endif
diff --git a/include/hashcomp.h b/include/hashcomp.h
index 928abe809..e93875e3e 100644
--- a/include/hashcomp.h
+++ b/include/hashcomp.h
@@ -645,8 +645,8 @@ inline std::string& trim(std::string &str)
/** Hashing stuff is totally different on vc++'s hash_map implementation, so to save a buttload of
* #ifdefs we'll just do it all at once
*/
-namespace nspace
-{
+BEGIN_HASHMAP_NAMESPACE
+
/** Hashing function to hash irc::string
*/
#ifdef WINDOWS
@@ -711,7 +711,8 @@ namespace nspace
* @param n A string to lowercase
*/
void strlower(char *n);
-}
+
+END_HASHMAP_NAMESPACE
#endif