diff --git a/src/key_defs.h b/src/key_defs.h index 76026368..91db5d7b 100644 --- a/src/key_defs.h +++ b/src/key_defs.h @@ -26,29 +26,29 @@ union Key { }; uint16_t raw; - constexpr inline bool operator==(uint16_t rhs) const { + constexpr inline bool operator==(const uint16_t rhs) const { return this->raw == rhs; } - constexpr inline bool operator==(const Key rhs) const { + constexpr inline bool operator==(const Key& rhs) const { return this->raw == rhs.raw; } - inline Key& operator=(uint16_t raw) { + inline Key& operator=(const uint16_t raw) { this->raw = raw; return *this; } constexpr inline bool operator!=(const Key& rhs) const { return !(*this == rhs); } - constexpr inline bool operator>=(uint16_t raw) const { + constexpr inline bool operator>=(const uint16_t raw) const { return this->raw >= raw; } - constexpr inline bool operator<=(uint16_t raw) const { + constexpr inline bool operator<=(const uint16_t raw) const { return this->raw <= raw; } - constexpr inline bool operator>(uint16_t raw) const { + constexpr inline bool operator>(const uint16_t raw) const { return this->raw > raw; } - constexpr inline bool operator<(uint16_t raw) const { + constexpr inline bool operator<(const uint16_t raw) const { return this->raw < raw; } constexpr inline bool operator>=(const Key& other) const {