mirror of
https://github.com/MoleskiCoder/EightBit.git
synced 2025-01-15 12:30:51 +00:00
Use the "<=>" operator in the register16_t class to give comparison operators for free.
This commit is contained in:
parent
6346ea9278
commit
cbcb2c5de1
@ -74,8 +74,8 @@ namespace EightBit {
|
||||
return lhs.word == rhs.word;
|
||||
}
|
||||
|
||||
[[nodiscard]] constexpr inline auto operator!=(const register16_t lhs, const register16_t rhs) noexcept {
|
||||
return !(lhs == rhs);
|
||||
[[nodiscard]] constexpr auto operator<=>(const register16_t lhs, const register16_t rhs) noexcept {
|
||||
return lhs.word <=> rhs.word;
|
||||
}
|
||||
|
||||
[[nodiscard]] constexpr inline auto operator+(register16_t lhs, const register16_t rhs) noexcept {
|
||||
|
Loading…
x
Reference in New Issue
Block a user