From 3ccdeed57a420839a2d96bc30d07de9812332a89 Mon Sep 17 00:00:00 2001 From: Xavi Del Campo Date: Sat, 1 Feb 2020 07:20:00 +0100 Subject: [PATCH] Removed useless const qualifiers --- libfixmath/fixmath/fix16.hpp | 60 ++++++++++++++++++------------------ 1 file changed, 30 insertions(+), 30 deletions(-) diff --git a/libfixmath/fixmath/fix16.hpp b/libfixmath/fixmath/fix16.hpp index 493f08e..bd97c7c 100755 --- a/libfixmath/fixmath/fix16.hpp +++ b/libfixmath/fixmath/fix16.hpp @@ -105,41 +105,41 @@ class Fix16 { const Fix16 sdiv(const int16_t other) const { Fix16 ret = fix16_sdiv(value, fix16_from_int(other)); return ret; } #endif - const int operator==(const Fix16 &other) const { return (value == other.value); } - const int operator==(const fix16_t other) const { return (value == other); } - const int operator==(const double other) const { return (value == fix16_from_dbl(other)); } - const int operator==(const float other) const { return (value == fix16_from_float(other)); } - const int operator==(const int16_t other) const { return (value == fix16_from_int(other)); } + int operator==(const Fix16 &other) const { return (value == other.value); } + int operator==(const fix16_t other) const { return (value == other); } + int operator==(const double other) const { return (value == fix16_from_dbl(other)); } + int operator==(const float other) const { return (value == fix16_from_float(other)); } + int operator==(const int16_t other) const { return (value == fix16_from_int(other)); } - const int operator!=(const Fix16 &other) const { return (value != other.value); } - const int operator!=(const fix16_t other) const { return (value != other); } - const int operator!=(const double other) const { return (value != fix16_from_dbl(other)); } - const int operator!=(const float other) const { return (value != fix16_from_float(other)); } - const int operator!=(const int16_t other) const { return (value != fix16_from_int(other)); } + int operator!=(const Fix16 &other) const { return (value != other.value); } + int operator!=(const fix16_t other) const { return (value != other); } + int operator!=(const double other) const { return (value != fix16_from_dbl(other)); } + int operator!=(const float other) const { return (value != fix16_from_float(other)); } + int operator!=(const int16_t other) const { return (value != fix16_from_int(other)); } - const int operator<=(const Fix16 &other) const { return (value <= other.value); } - const int operator<=(const fix16_t other) const { return (value <= other); } - const int operator<=(const double other) const { return (value <= fix16_from_dbl(other)); } - const int operator<=(const float other) const { return (value <= fix16_from_float(other)); } - const int operator<=(const int16_t other) const { return (value <= fix16_from_int(other)); } + int operator<=(const Fix16 &other) const { return (value <= other.value); } + int operator<=(const fix16_t other) const { return (value <= other); } + int operator<=(const double other) const { return (value <= fix16_from_dbl(other)); } + int operator<=(const float other) const { return (value <= fix16_from_float(other)); } + int operator<=(const int16_t other) const { return (value <= fix16_from_int(other)); } - const int operator>=(const Fix16 &other) const { return (value >= other.value); } - const int operator>=(const fix16_t other) const { return (value >= other); } - const int operator>=(const double other) const { return (value >= fix16_from_dbl(other)); } - const int operator>=(const float other) const { return (value >= fix16_from_float(other)); } - const int operator>=(const int16_t other) const { return (value >= fix16_from_int(other)); } + int operator>=(const Fix16 &other) const { return (value >= other.value); } + int operator>=(const fix16_t other) const { return (value >= other); } + int operator>=(const double other) const { return (value >= fix16_from_dbl(other)); } + int operator>=(const float other) const { return (value >= fix16_from_float(other)); } + int operator>=(const int16_t other) const { return (value >= fix16_from_int(other)); } - const int operator< (const Fix16 &other) const { return (value < other.value); } - const int operator< (const fix16_t other) const { return (value < other); } - const int operator< (const double other) const { return (value < fix16_from_dbl(other)); } - const int operator< (const float other) const { return (value < fix16_from_float(other)); } - const int operator< (const int16_t other) const { return (value < fix16_from_int(other)); } + int operator< (const Fix16 &other) const { return (value < other.value); } + int operator< (const fix16_t other) const { return (value < other); } + int operator< (const double other) const { return (value < fix16_from_dbl(other)); } + int operator< (const float other) const { return (value < fix16_from_float(other)); } + int operator< (const int16_t other) const { return (value < fix16_from_int(other)); } - const int operator> (const Fix16 &other) const { return (value > other.value); } - const int operator> (const fix16_t other) const { return (value > other); } - const int operator> (const double other) const { return (value > fix16_from_dbl(other)); } - const int operator> (const float other) const { return (value > fix16_from_float(other)); } - const int operator> (const int16_t other) const { return (value > fix16_from_int(other)); } + int operator> (const Fix16 &other) const { return (value > other.value); } + int operator> (const fix16_t other) const { return (value > other); } + int operator> (const double other) const { return (value > fix16_from_dbl(other)); } + int operator> (const float other) const { return (value > fix16_from_float(other)); } + int operator> (const int16_t other) const { return (value > fix16_from_int(other)); } Fix16 sin() const { return Fix16(fix16_sin(value)); } Fix16 cos() const { return Fix16(fix16_cos(value)); }