diff options
author | bunnei <bunneidev@gmail.com> | 2021-08-08 02:18:46 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-08-08 02:18:46 +0200 |
commit | 63325cafbe44cfa592fb03b0d68af1cf4a792c5b (patch) | |
tree | 88de695ab886ede9046edd7c9f9d0cbb1129d3c3 | |
parent | Merge pull request #6830 from ameerj/nvdec-unimpld-codec (diff) | |
parent | common: uuid: Add hash function for UUID (diff) | |
download | yuzu-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.h | 11 |
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 |