Core/ObjectRef: Make hashable
Former-commit-id: 42dd274e98f24c09612321e2f8d0e957463748d8
This commit is contained in:
@@ -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>
|
||||
|
||||
Reference in New Issue
Block a user