diff --git a/Source/Core/DiscIO/Volume.h b/Source/Core/DiscIO/Volume.h index a26db94370..05325aced2 100644 --- a/Source/Core/DiscIO/Volume.h +++ b/Source/Core/DiscIO/Volume.h @@ -26,18 +26,18 @@ class VolumeWAD; struct Partition final { - Partition() : offset(std::numeric_limits::max()) {} - explicit Partition(u64 offset_) : offset(offset_) {} - bool operator==(const Partition& other) const { return offset == other.offset; } - bool operator!=(const Partition& other) const { return !(*this == other); } - bool operator<(const Partition& other) const { return offset < other.offset; } - bool operator>(const Partition& other) const { return other < *this; } - bool operator<=(const Partition& other) const { return !(*this < other); } - bool operator>=(const Partition& other) const { return !(*this > other); } - u64 offset; + 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 !(*this == other); } + 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); } + u64 offset{std::numeric_limits::max()}; }; -const Partition PARTITION_NONE(std::numeric_limits::max() - 1); +constexpr Partition PARTITION_NONE(std::numeric_limits::max() - 1); class Volume {