summaryrefslogtreecommitdiff
path: root/Source
diff options
context:
space:
mode:
authorGlenn Rice <glennricster@gmail.com>2012-12-10 08:40:27 -0600
committerGlenn Rice <glennricster@gmail.com>2012-12-10 08:40:27 -0600
commitf6df3d15134def6845dfe74fa7d38d1d6688e5a5 (patch)
treebd07491523014fadfa2ea3de53ab281f390579cd /Source
parent330ea74d197d718bb69b0cd63f935f42117d295a (diff)
OSX build fix for the unordered_map/hash_map issue.
Diffstat (limited to 'Source')
-rw-r--r--Source/Core/VideoCommon/Src/VertexLoaderManager.cpp16
1 files changed, 14 insertions, 2 deletions
diff --git a/Source/Core/VideoCommon/Src/VertexLoaderManager.cpp b/Source/Core/VideoCommon/Src/VertexLoaderManager.cpp
index 4afa6e941b..153e69a8c3 100644
--- a/Source/Core/VideoCommon/Src/VertexLoaderManager.cpp
+++ b/Source/Core/VideoCommon/Src/VertexLoaderManager.cpp
@@ -19,6 +19,9 @@
#ifdef _MSC_VER
#include <hash_map>
using stdext::hash_map;
+#elif defined __APPLE__
+#include <ext/hash_map>
+using __gnu_cxx::hash_map;
#else
#include <unordered_map>
using std::unordered_map;
@@ -44,15 +47,24 @@ namespace stdext {
return uid.GetHash();
}
}
-typedef hash_map<VertexLoaderUID, VertexLoader*> VertexLoaderMap;
#else
-namespace std {
+#ifdef __APPLE__
+namespace __gnu_cxx
+#else
+namespace std
+#endif
+{
template<> struct hash<VertexLoaderUID> {
size_t operator()(const VertexLoaderUID& uid) const {
return uid.GetHash();
}
};
}
+#endif
+
+#if defined _MSC_VER || defined __APPLE__
+typedef hash_map<VertexLoaderUID, VertexLoader*> VertexLoaderMap;
+#else
typedef unordered_map<VertexLoaderUID, VertexLoader*> VertexLoaderMap;
#endif