Tweaked UUID for hashing

This commit is contained in:
2026-01-06 01:30:09 +02:00
parent 8174c19f00
commit 6d9edc18b4
2 changed files with 30 additions and 1 deletions

View File

@@ -20,6 +20,16 @@ std::string UUID::asString() const {
return std::format("{:016X}{:016X}", data[0], data[1]);
}
bool UUID::operator==(const UUID &rhs) const {
// Since size may be increased
for (uint8_t index = 0; index < QWORDLength; index++) {
if (this->data[index] != rhs.data[index]) {
return false;
}
}
return true;
}
UUID::UUID(const UUID &uuid) {
std::memcpy(data.get(), uuid.data.get(), UUID::ByteLength);
}