early-access version 2488

This commit is contained in:
pineappleEA
2022-02-12 07:27:44 +01:00
parent 3ba25dc6f2
commit 3a22803f0a
5 changed files with 48 additions and 12 deletions

View File

@@ -160,13 +160,13 @@ std::string UUID::FormattedString() const {
}
size_t UUID::Hash() const noexcept {
u64 hash;
u64 temp;
u64 upper_hash;
u64 lower_hash;
std::memcpy(&hash, uuid.data(), sizeof(u64));
std::memcpy(&temp, uuid.data() + 8, sizeof(u64));
std::memcpy(&upper_hash, uuid.data(), sizeof(u64));
std::memcpy(&lower_hash, uuid.data() + sizeof(u64), sizeof(u64));
return hash ^ std::rotl(temp, 1);
return upper_hash ^ std::rotl(lower_hash, 1);
}
u128 UUID::AsU128() const {