From 574288502115a315f18d5ede341a803e4181647c Mon Sep 17 00:00:00 2001 From: Madeline Busig Date: Sun, 18 Aug 2024 23:49:01 -0700 Subject: [PATCH] Fix incorrect return type on fixed point comparison operators --- include/mtl/fixed.hpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/include/mtl/fixed.hpp b/include/mtl/fixed.hpp index 96d7d83..a77aff5 100644 --- a/include/mtl/fixed.hpp +++ b/include/mtl/fixed.hpp @@ -171,22 +171,22 @@ public: /** * \brief Comparison operators */ - constexpr fixed operator==(fixed rhs) const noexcept { + constexpr bool operator==(fixed rhs) const noexcept { return x == rhs.x; } - constexpr fixed operator!=(fixed rhs) const noexcept { + constexpr bool operator!=(fixed rhs) const noexcept { return x != rhs.x; } - constexpr fixed operator>(fixed rhs) const noexcept { + constexpr bool operator>(fixed rhs) const noexcept { return x > rhs.x; } - constexpr fixed operator>=(fixed rhs) const noexcept { + constexpr bool operator>=(fixed rhs) const noexcept { return x >= rhs.x; } - constexpr fixed operator<(fixed rhs) const noexcept { + constexpr bool operator<(fixed rhs) const noexcept { return x < rhs.x; } - constexpr fixed operator<=(fixed rhs) const noexcept { + constexpr bool operator<=(fixed rhs) const noexcept { return x <= rhs.x; } };