mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-06-09 09:34:57 +09:00
AK: Use int_hash() to generate less idiotic hashes for {Nonnull,}OwnPtr
This commit is contained in:
parent
e0395d5ebe
commit
eaa9cf58f5
Notes:
sideshowbarker
2024-07-19 12:40:48 +09:00
Author: https://github.com/awesomekling
Commit: eaa9cf58f5
2 changed files with 2 additions and 2 deletions
|
@ -143,7 +143,7 @@ make(Args&&... args)
|
|||
template<typename T>
|
||||
struct Traits<NonnullOwnPtr<T>> : public GenericTraits<NonnullOwnPtr<T>> {
|
||||
using PeekType = const T*;
|
||||
static unsigned hash(const NonnullOwnPtr<T>& p) { return (unsigned)p.ptr(); }
|
||||
static unsigned hash(const NonnullOwnPtr<T>& p) { return int_hash((u32)p.ptr()); }
|
||||
static void dump(const NonnullOwnPtr<T>& p) { kprintf("%p", 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