mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-04-24 22:34:54 +00:00
Merge pull request #13518 from tygyh/Fix-Partition-struct-comparison-operators
DiscIO/Volume: Fix Partition struct comparison operators
This commit is contained in:
commit
f8bf35e6f0
1 changed files with 1 additions and 4 deletions
|
@ -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()};
|
||||
};
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue