diff --git a/src/units.hh b/src/units.hh index 652b66ab..8f9172ca 100644 --- a/src/units.hh +++ b/src/units.hh @@ -17,28 +17,28 @@ public: "RealType is not derived from StronglyTypedNumber"); } - constexpr RealType operator+(const RealType& other) const + constexpr RealType operator+(RealType other) const { return RealType(m_value + other.m_value); } - constexpr RealType operator-(const RealType& other) const + constexpr RealType operator-(RealType other) const { return RealType(m_value - other.m_value); } - constexpr RealType operator*(const RealType& other) const + constexpr RealType operator*(RealType other) const { return RealType(m_value * other.m_value); } - constexpr RealType operator/(const RealType& other) const + constexpr RealType operator/(RealType other) const { return RealType(m_value / other.m_value); } - RealType& operator+=(const RealType& other) + RealType& operator+=(RealType other) { m_value += other.m_value; return static_cast(*this); } - RealType& operator-=(const RealType& other) + RealType& operator-=(RealType other) { m_value -= other.m_value; return static_cast(*this); } - RealType& operator*=(const RealType& other) + RealType& operator*=(RealType other) { m_value *= other.m_value; return static_cast(*this); } - RealType& operator/=(const RealType& other) + RealType& operator/=(RealType other) { m_value /= other.m_value; return static_cast(*this); } RealType& operator++() @@ -55,22 +55,22 @@ public: constexpr RealType operator-() { return RealType(-m_value); } - constexpr bool operator==(const RealType& other) const + constexpr bool operator==(RealType other) const { return m_value == other.m_value; } - constexpr bool operator!=(const RealType& other) const + constexpr bool operator!=(RealType other) const { return m_value != other.m_value; } - constexpr bool operator<(const RealType& other) const + constexpr bool operator<(RealType other) const { return m_value < other.m_value; } - constexpr bool operator<=(const RealType& other) const + constexpr bool operator<=(RealType other) const { return m_value <= other.m_value; } - constexpr bool operator>(const RealType& other) const + constexpr bool operator>(RealType other) const { return m_value > other.m_value; } - constexpr bool operator>=(const RealType& other) const + constexpr bool operator>=(RealType other) const { return m_value >= other.m_value; } constexpr bool operator!() const