diff options
| author | Jordan Woyak <jordan.woyak@gmail.com> | 2025-04-16 00:20:28 -0500 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-04-16 00:20:28 -0500 |
| commit | f8bf35e6f01e0165e2877031bf19cd17e71e61e2 (patch) | |
| tree | c4665e800d296e4b86a63359037179a0086bcd24 /Source/Core/DiscIO | |
| parent | 8bfde300f403db85e105533b50a97a3b19af3de2 (diff) | |
| parent | 3bb925c1c7fcd224fe57ea0557e9dd92cbd567eb (diff) | |
Merge pull request #13518 from tygyh/Fix-Partition-struct-comparison-operators
DiscIO/Volume: Fix Partition struct comparison operators
Diffstat (limited to 'Source/Core/DiscIO')
| -rw-r--r-- | Source/Core/DiscIO/Volume.h | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/Source/Core/DiscIO/Volume.h b/Source/Core/DiscIO/Volume.h index 1c216178c3..8ac6d113ed 100644 --- a/Source/Core/DiscIO/Volume.h +++ b/Source/Core/DiscIO/Volume.h @@ -32,10 +32,7 @@ struct Partition final constexpr Partition() = default; constexpr explicit Partition(u64 offset_) : offset(offset_) {} constexpr bool operator==(const Partition& other) const { return offset == other.offset; } - constexpr bool operator<(const Partition& other) const { return offset < other.offset; } - constexpr bool operator>(const Partition& other) const { return other < *this; } - constexpr bool operator<=(const Partition& other) const { return !(*this < other); } - constexpr bool operator>=(const Partition& other) const { return !(*this > other); } + constexpr auto operator<=>(const Partition other) const { return offset <=> other.offset; } u64 offset{std::numeric_limits<u64>::max()}; }; |
