Core/ObjectRef: Make hashable
Former-commit-id: 42dd274e98f24c09612321e2f8d0e957463748d8
This commit is contained in:
parent
c94c525446
commit
e907db7de1
|
|
@ -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>
|
||||
|
|
|
|||
Loading…
Reference in New Issue