mirror of
https://github.com/RGBCube/serenity
synced 2025-06-01 12:08:14 +00:00
AK: Make traits for NonnullOwnPtr use ptr_hash instead of int_hash
Otherwise they'd be truncating the pointer in 64-bit builds.
This commit is contained in:
parent
7632cce5e5
commit
a21a3c2620
1 changed files with 1 additions and 1 deletions
|
@ -176,7 +176,7 @@ template<typename T>
|
|||
struct Traits<NonnullOwnPtr<T>> : public GenericTraits<NonnullOwnPtr<T>> {
|
||||
using PeekType = T*;
|
||||
using ConstPeekType = const T*;
|
||||
static unsigned hash(const NonnullOwnPtr<T>& p) { return int_hash((u32)p.ptr()); }
|
||||
static unsigned hash(const NonnullOwnPtr<T>& p) { return ptr_hash((FlatPtr)p.ptr()); }
|
||||
static bool equals(const NonnullOwnPtr<T>& a, const NonnullOwnPtr<T>& b) { return a.ptr() == b.ptr(); }
|
||||
};
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue