Core/ObjectRef: Make hashable

Former-commit-id: 42dd274e98f24c09612321e2f8d0e957463748d8
This commit is contained in:
Lynix 2016-01-19 12:19:27 +01:00
parent c94c525446
commit e907db7de1
1 changed files with 13 additions and 0 deletions

View File

@ -152,4 +152,17 @@ namespace Nz
}
}
namespace std
{
template<typename T>
struct hash<Nz::ObjectRef<T>>
{
size_t operator()(const Nz::ObjectRef<T>& object) const
{
hash<T*> h;
return h(object.Get());
}
};
}
#include <Nazara/Core/DebugOff.hpp>