mirror of
https://github.com/yuzu-emu/yuzu-android.git
synced 2024-12-27 01:46:00 +00:00
Merge pull request #6827 from Morph1984/uuid-hash
common: uuid: Add hash function for UUID
This commit is contained in:
commit
63325cafbe
|
@ -69,3 +69,14 @@ struct UUID {
|
||||||
static_assert(sizeof(UUID) == 16, "UUID is an invalid size!");
|
static_assert(sizeof(UUID) == 16, "UUID is an invalid size!");
|
||||||
|
|
||||||
} // namespace Common
|
} // 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
|
||||||
|
|
Loading…
Reference in a new issue