summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLinus Groh <mail@linusgroh.de>2022-07-11 22:18:18 +0100
committerLinus Groh <mail@linusgroh.de>2022-07-14 00:42:26 +0100
commit3953004e609ca6099bdc09d0e118ff083cce2b34 (patch)
tree6cdbe2b4750d69d7b71869752585858aa72e5f1a
parentbb0feebddc7d60afefc62a6e245a532cf5252296 (diff)
downloadserenity-3953004e609ca6099bdc09d0e118ff083cce2b34.zip
AK: Add Traits<ByteBuffer>::hash()
-rw-r--r--AK/ByteBuffer.h9
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());
+ }
+};
+
}