mirror of
https://github.com/SerenityOS/serenity
synced 2024-10-06 16:09:30 +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
|
@ -54,6 +54,12 @@ struct Traits<unsigned> : public GenericTraits<unsigned> {
|
|||
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<>
|
||||
struct Traits<u16> : public GenericTraits<u16> {
|
||||
static constexpr bool is_trivial() { return true; }
|
||||
|
|
Loading…
Reference in a new issue