aboutsummaryrefslogtreecommitdiff
path: root/src/framework/Utilities
diff options
context:
space:
mode:
authorKingPin <none@none>2008-11-10 06:53:00 -0600
committerKingPin <none@none>2008-11-10 06:53:00 -0600
commit09280b0091474b58d43daf42c0f3d99f86e6ec25 (patch)
treea6b9b17869b7e035811baa36bc1a0e2b618af216 /src/framework/Utilities
parentf2250030cd7ea58eb9de63a96c34656ac1916369 (diff)
[svn] * Switch from hashmap to unordered map. - cleanup source - mangos. Help - Aokromes
--HG-- branch : trunk rename : src/framework/Utilities/HashMap.h => src/framework/Utilities/UnorderedMap.h
Diffstat (limited to 'src/framework/Utilities')
-rw-r--r--src/framework/Utilities/UnorderedMap.h (renamed from src/framework/Utilities/HashMap.h)23
1 files changed, 15 insertions, 8 deletions
diff --git a/src/framework/Utilities/HashMap.h b/src/framework/Utilities/UnorderedMap.h
index ed124bc4bf7..17d1742fc6c 100644
--- a/src/framework/Utilities/HashMap.h
+++ b/src/framework/Utilities/UnorderedMap.h
@@ -18,32 +18,39 @@
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
-#ifndef TRINITY_HASHMAP_H
-#define TRINITY_HASHMAP_H
+#ifndef TRINITY_UNORDERED_MAP_H
+#define TRINITY_UNORDERED_MAP_H
#include "Platform/CompilerDefs.h"
#include "Platform/Define.h"
#if COMPILER == COMPILER_INTEL
#include <ext/hash_map>
+#elif COMPILER == COMPILER_GNU && __GNUC__ >= 4
+#include <tr1/unordered_map>
#elif COMPILER == COMPILER_GNU && __GNUC__ >= 3
#include <ext/hash_map>
+#elif COMPILER == COMPILER_MICROSOFT && _MSC_VER >= 1500 && _HAS_TR1 // VC9.0 and later
+#include <unordered_map>
#else
#include <hash_map>
#endif
#ifdef _STLPORT_VERSION
-#define HM_NAMESPACE std
+#define UNORDERED_MAP std::hash_map
using std::hash_map;
+#elif COMPILER == COMPILER_MICROSOFT && _MSC_VER >= 1500 && _HAS_TR1
+#define UNORDERED_MAP std::tr1::unordered_map
#elif COMPILER == COMPILER_MICROSOFT && _MSC_VER >= 1300
-#define HM_NAMESPACE stdext
+#define UNORDERED_MAP stdext::hash_map
using stdext::hash_map;
#elif COMPILER == COMPILER_INTEL
-#define HM_NAMESPACE std
+#define UNORDERED_MAP std::hash_map
using std::hash_map;
+#elif COMPILER == COMPILER_GNU && __GNUC__ >= 4
+#define UNORDERED_MAP std::tr1::unordered_map
#elif COMPILER == COMPILER_GNU && __GNUC__ >= 3
-#define HM_NAMESPACE __gnu_cxx
-using __gnu_cxx::hash_map;
+#define UNORDERED_MAP std::__gnu_cxx::hash_map
namespace __gnu_cxx
{
@@ -59,7 +66,7 @@ namespace __gnu_cxx
};
#else
-#define HM_NAMESPACE std
+#define UNORDERED_MAP std::hash_map
using std::hash_map;
#endif
#endif