summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
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 f5137e99..d4988ccf 100644
--- a/src/units.hh
+++ b/src/units.hh
@@ -42,10 +42,10 @@ public:
{ --m_value; return static_cast<RealType&>(*this); }
RealType operator++(int)
- { RealType backup(*this); ++m_value; return backup; }
+ { RealType backup(static_cast<RealType&>(*this)); ++m_value; return backup; }
RealType operator--(int)
- { RealType backup(*this); --m_value; return backup; }
+ { RealType backup(static_cast<RealType&>(*this)); --m_value; return backup; }
constexpr RealType operator-() { return RealType(-m_value); }