summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorMaxime Coste <frrrwww@gmail.com>2013-11-11 19:11:17 +0000
committerMaxime Coste <frrrwww@gmail.com>2013-11-11 19:11:17 +0000
commit83a6375263a5e8635a8a2387d1986a68b1669146 (patch)
tree136cbf91c5924e2095b5ea282b2e946f484f8050 /src
parent6b77860fc0daef88db4486f71ae027fd2a5ad7f3 (diff)
Fix StronglyTypedInteger::operator%=
Diffstat (limited to 'src')
-rw-r--r--src/units.hh4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/units.hh b/src/units.hh
index a99957f9..99e2db45 100644
--- a/src/units.hh
+++ b/src/units.hh
@@ -53,12 +53,12 @@ public:
RealType operator--(int)
{ RealType backup(static_cast<RealType&>(*this)); --m_value; return backup; }
- constexpr RealType operator-() { return RealType(-m_value); }
+ constexpr RealType operator-() const { return RealType(-m_value); }
constexpr RealType operator%(RealType other) const
{ return RealType(m_value % other.m_value); }
- constexpr RealType operator%=(RealType other)
+ RealType& operator%=(RealType other)
{ m_value %= other.m_value; return static_cast<RealType&>(*this); }
constexpr bool operator==(RealType other) const