From 946b4650b6ff9f63b05723a2c7649424ea3231da Mon Sep 17 00:00:00 2001 From: Maxime Coste Date: Tue, 2 Oct 2012 14:19:45 +0200 Subject: fix postfix StronglyTypedInteger::operator{++,--} --- src/units.hh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src') 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(*this); } RealType operator++(int) - { RealType backup(*this); ++m_value; return backup; } + { RealType backup(static_cast(*this)); ++m_value; return backup; } RealType operator--(int) - { RealType backup(*this); --m_value; return backup; } + { RealType backup(static_cast(*this)); --m_value; return backup; } constexpr RealType operator-() { return RealType(-m_value); } -- cgit v1.2.3