mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 18:57:35 +00:00
AK: Add missing GenericTraits<u8>
This enables us to use keys of type u8 in HashMaps.
This commit is contained in:
parent
d4b2e89875
commit
0b252c31b2
1 changed files with 6 additions and 0 deletions
|
@ -54,6 +54,12 @@ struct Traits<unsigned> : public GenericTraits<unsigned> {
|
||||||
static unsigned hash(unsigned u) { return int_hash(u); }
|
static unsigned hash(unsigned u) { return int_hash(u); }
|
||||||
};
|
};
|
||||||
|
|
||||||
|
template<>
|
||||||
|
struct Traits<u8> : public GenericTraits<u8> {
|
||||||
|
static constexpr bool is_trivial() { return true; }
|
||||||
|
static unsigned hash(u8 u) { return int_hash(u); }
|
||||||
|
};
|
||||||
|
|
||||||
template<>
|
template<>
|
||||||
struct Traits<u16> : public GenericTraits<u16> {
|
struct Traits<u16> : public GenericTraits<u16> {
|
||||||
static constexpr bool is_trivial() { return true; }
|
static constexpr bool is_trivial() { return true; }
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue