diff options
author | Linus Groh <mail@linusgroh.de> | 2022-07-11 22:18:18 +0100 |
---|---|---|
committer | Linus Groh <mail@linusgroh.de> | 2022-07-14 00:42:26 +0100 |
commit | 3953004e609ca6099bdc09d0e118ff083cce2b34 (patch) | |
tree | 6cdbe2b4750d69d7b71869752585858aa72e5f1a /AK/ByteBuffer.h | |
parent | bb0feebddc7d60afefc62a6e245a532cf5252296 (diff) | |
download | serenity-3953004e609ca6099bdc09d0e118ff083cce2b34.zip |
AK: Add Traits<ByteBuffer>::hash()
Diffstat (limited to 'AK/ByteBuffer.h')
-rw-r--r-- | AK/ByteBuffer.h | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/AK/ByteBuffer.h b/AK/ByteBuffer.h index d8e5848b88..43dec2cc58 100644 --- a/AK/ByteBuffer.h +++ b/AK/ByteBuffer.h @@ -321,4 +321,13 @@ private: }; } + +template<> +struct Traits<ByteBuffer> : public GenericTraits<ByteBuffer> { + static unsigned hash(ByteBuffer const& byte_buffer) + { + return Traits<ReadonlyBytes>::hash(byte_buffer.span()); + } +}; + } |