mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-06-10 18:10:56 +09:00
AK: Defer to Traits<T> for equality comparison in container templates.
This is prep work for supporting HashMap with NonnullRefPtr<T> as values. It's currently not possible because many HashTable functions require being able to default-construct the value type.
This commit is contained in:
parent
9a7dc06567
commit
d5bb98acbc
Notes:
sideshowbarker
2024-07-19 13:26:56 +09:00
Author: https://github.com/awesomekling
Commit: d5bb98acbc
14 changed files with 61 additions and 31 deletions
|
@ -89,7 +89,7 @@ inline bool InodeIdentifier::is_root_inode() const
|
|||
namespace AK {
|
||||
|
||||
template<>
|
||||
struct Traits<InodeIdentifier> {
|
||||
struct Traits<InodeIdentifier> : public GenericTraits<InodeIdentifier> {
|
||||
static unsigned hash(const InodeIdentifier& inode) { return pair_int_hash(inode.fsid(), inode.index()); }
|
||||
static void dump(const InodeIdentifier& inode) { kprintf("%02u:%08u", inode.fsid(), inode.index()); }
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue