cpp: Fix less compare for address and bytes32
@@ -161,9 +161,9 @@ constexpr bool operator<(const address& a, const address& b) noexcept
{
return load64be(&a.bytes[0]) < load64be(&b.bytes[0]) ||
(load64be(&a.bytes[0]) == load64be(&b.bytes[0]) &&
- load64be(&a.bytes[8]) < load64be(&b.bytes[8])) ||
+ (load64be(&a.bytes[8]) < load64be(&b.bytes[8]) ||
(load64be(&a.bytes[8]) == load64be(&b.bytes[8]) &&
- load32be(&a.bytes[16]) < load32be(&b.bytes[16]));
+ load32be(&a.bytes[16]) < load32be(&b.bytes[16]))));
}
/// The "greater than" comparison operator for the evmc::address type.
@@ -204,11 +204,11 @@ constexpr bool operator<(const bytes32& a, const bytes32& b) noexcept
{
return load64be(&a.bytes[0]) < load64be(&b.bytes[0]) ||
(load64be(&a.bytes[0]) == load64be(&b.bytes[0]) &&
- load64be(&a.bytes[8]) < load64be(&b.bytes[8])) ||
+ (load64be(&a.bytes[8]) < load64be(&b.bytes[8]) ||
(load64be(&a.bytes[8]) == load64be(&b.bytes[8]) &&
- load64be(&a.bytes[16]) < load64be(&b.bytes[16])) ||
+ (load64be(&a.bytes[16]) < load64be(&b.bytes[16]) ||
(load64be(&a.bytes[16]) == load64be(&b.bytes[16]) &&
- load64be(&a.bytes[24]) < load64be(&b.bytes[24]));
+ load64be(&a.bytes[24]) < load64be(&b.bytes[24]))))));
}
/// The "greater than" comparison operator for the evmc::bytes32 type.
