fixed less or equal operator on UUIDs
This commit is contained in:
Crashoz 2021-03-03 13:24:53 +01:00 committed by GitHub
parent fb4909a468
commit faf088bebd
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -165,7 +165,7 @@ class UUID {
// It's faster to compare two uint64_t
uint64_t *x = (uint64_t*)lhs.data;
uint64_t *y = (uint64_t*)rhs.data;
return *x < *y || *(x+1) < *(y+1);
return *x < *y || (*x == *y && *(x + 1) < *(y + 1));
}
friend bool operator!=(const UUID &lhs, const UUID &rhs) { return !(lhs == rhs); }