mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-23 06:09:50 -06:00
OSX build fix for the unordered_map/hash_map issue.
This commit is contained in:
@ -19,6 +19,9 @@
|
|||||||
#ifdef _MSC_VER
|
#ifdef _MSC_VER
|
||||||
#include <hash_map>
|
#include <hash_map>
|
||||||
using stdext::hash_map;
|
using stdext::hash_map;
|
||||||
|
#elif defined __APPLE__
|
||||||
|
#include <ext/hash_map>
|
||||||
|
using __gnu_cxx::hash_map;
|
||||||
#else
|
#else
|
||||||
#include <unordered_map>
|
#include <unordered_map>
|
||||||
using std::unordered_map;
|
using std::unordered_map;
|
||||||
@ -44,15 +47,24 @@ namespace stdext {
|
|||||||
return uid.GetHash();
|
return uid.GetHash();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
typedef hash_map<VertexLoaderUID, VertexLoader*> VertexLoaderMap;
|
|
||||||
#else
|
#else
|
||||||
namespace std {
|
#ifdef __APPLE__
|
||||||
|
namespace __gnu_cxx
|
||||||
|
#else
|
||||||
|
namespace std
|
||||||
|
#endif
|
||||||
|
{
|
||||||
template<> struct hash<VertexLoaderUID> {
|
template<> struct hash<VertexLoaderUID> {
|
||||||
size_t operator()(const VertexLoaderUID& uid) const {
|
size_t operator()(const VertexLoaderUID& uid) const {
|
||||||
return uid.GetHash();
|
return uid.GetHash();
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#if defined _MSC_VER || defined __APPLE__
|
||||||
|
typedef hash_map<VertexLoaderUID, VertexLoader*> VertexLoaderMap;
|
||||||
|
#else
|
||||||
typedef unordered_map<VertexLoaderUID, VertexLoader*> VertexLoaderMap;
|
typedef unordered_map<VertexLoaderUID, VertexLoader*> VertexLoaderMap;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user