DiscIO/Volume: Fix Partition struct comparison operators

This commit is contained in:
Dr. Dystopia 2025-04-15 08:17:45 +02:00
parent 4f210df86a
commit 3bb925c1c7

View file

@ -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()};
};