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 using stdext::hash_map; +#elif defined __APPLE__ +#include +using __gnu_cxx::hash_map; #else #include using std::unordered_map; @@ -44,15 +47,24 @@ namespace stdext { return uid.GetHash(); } } -typedef hash_map VertexLoaderMap; #else -namespace std { +#ifdef __APPLE__ +namespace __gnu_cxx +#else +namespace std +#endif +{ template<> struct hash { size_t operator()(const VertexLoaderUID& uid) const { return uid.GetHash(); } }; } +#endif + +#if defined _MSC_VER || defined __APPLE__ +typedef hash_map VertexLoaderMap; +#else typedef unordered_map VertexLoaderMap; #endif