summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorbunnei <bunneidev@gmail.com>2021-08-08 02:18:46 +0200
committerGitHub <noreply@github.com>2021-08-08 02:18:46 +0200
commit63325cafbe44cfa592fb03b0d68af1cf4a792c5b (patch)
tree88de695ab886ede9046edd7c9f9d0cbb1129d3c3
parentMerge pull request #6830 from ameerj/nvdec-unimpld-codec (diff)
parentcommon: uuid: Add hash function for UUID (diff)
downloadyuzu-63325cafbe44cfa592fb03b0d68af1cf4a792c5b.tar
yuzu-63325cafbe44cfa592fb03b0d68af1cf4a792c5b.tar.gz
yuzu-63325cafbe44cfa592fb03b0d68af1cf4a792c5b.tar.bz2
yuzu-63325cafbe44cfa592fb03b0d68af1cf4a792c5b.tar.lz
yuzu-63325cafbe44cfa592fb03b0d68af1cf4a792c5b.tar.xz
yuzu-63325cafbe44cfa592fb03b0d68af1cf4a792c5b.tar.zst
yuzu-63325cafbe44cfa592fb03b0d68af1cf4a792c5b.zip
-rw-r--r--src/common/uuid.h11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/common/uuid.h b/src/common/uuid.h
index aeb36939a..2353179d8 100644
--- a/src/common/uuid.h
+++ b/src/common/uuid.h
@@ -69,3 +69,14 @@ struct UUID {
static_assert(sizeof(UUID) == 16, "UUID is an invalid size!");
} // namespace Common
+
+namespace std {
+
+template <>
+struct hash<Common::UUID> {
+ size_t operator()(const Common::UUID& uuid) const noexcept {
+ return uuid.uuid[1] ^ uuid.uuid[0];
+ }
+};
+
+} // namespace std