summaryrefslogtreecommitdiff
path: root/Source/Core/VideoCommon/Src/VertexLoaderManager.cpp
diff options
context:
space:
mode:
authorMatthew Parlane <parlane@gmail.com>2013-01-01 23:28:46 +1300
committerMatthew Parlane <parlane@gmail.com>2013-01-01 23:28:46 +1300
commite0c9a1fd09b9be953bf0ae41b9014485e750b07e (patch)
tree059744e17a2a35ca58dd9b817cab620faee38611 /Source/Core/VideoCommon/Src/VertexLoaderManager.cpp
parentfe1fdc5e7b957312c906324134e42ca3484fa2d5 (diff)
parentc728ef2cd30ef803210d5db0a1ecab6b198a2c65 (diff)
Merge branch 'master' into wii-network
Conflicts: Source/Core/Common/Src/CommonPaths.h Source/Core/Core/CMakeLists.txt Source/Core/Core/Src/Boot/Boot_BS2Emu.cpp Source/Core/Core/Src/IPC_HLE/WII_IPC_HLE_Device_es.cpp Source/Core/Core/Src/IPC_HLE/WII_IPC_HLE_Device_net.cpp
Diffstat (limited to 'Source/Core/VideoCommon/Src/VertexLoaderManager.cpp')
-rw-r--r--Source/Core/VideoCommon/Src/VertexLoaderManager.cpp19
1 files changed, 16 insertions, 3 deletions
diff --git a/Source/Core/VideoCommon/Src/VertexLoaderManager.cpp b/Source/Core/VideoCommon/Src/VertexLoaderManager.cpp
index 316941a639..153e69a8c3 100644
--- a/Source/Core/VideoCommon/Src/VertexLoaderManager.cpp
+++ b/Source/Core/VideoCommon/Src/VertexLoaderManager.cpp
@@ -19,9 +19,12 @@
#ifdef _MSC_VER
#include <hash_map>
using stdext::hash_map;
-#else
+#elif defined __APPLE__
#include <ext/hash_map>
using __gnu_cxx::hash_map;
+#else
+#include <unordered_map>
+using std::unordered_map;
#endif
#include <map>
#include <vector>
@@ -45,7 +48,12 @@ namespace stdext {
}
}
#else
-namespace __gnu_cxx {
+#ifdef __APPLE__
+namespace __gnu_cxx
+#else
+namespace std
+#endif
+{
template<> struct hash<VertexLoaderUID> {
size_t operator()(const VertexLoaderUID& uid) const {
return uid.GetHash();
@@ -54,10 +62,15 @@ namespace __gnu_cxx {
}
#endif
+#if defined _MSC_VER || defined __APPLE__
+typedef hash_map<VertexLoaderUID, VertexLoader*> VertexLoaderMap;
+#else
+typedef unordered_map<VertexLoaderUID, VertexLoader*> VertexLoaderMap;
+#endif
+
namespace VertexLoaderManager
{
-typedef hash_map<VertexLoaderUID, VertexLoader*> VertexLoaderMap;
static VertexLoaderMap g_VertexLoaderMap;
// TODO - change into array of pointers. Keep a map of all seen so far.