From d5c665e27e46f7c91b38ca7d808cebc4876cbd5a Mon Sep 17 00:00:00 2001 From: Sam Hocevar Date: Sat, 26 Aug 2017 18:58:49 +0200 Subject: [PATCH] Fix a bug in the real * int op that prevented an optimisation. --- src/lol/math/real.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/lol/math/real.h b/src/lol/math/real.h index b4721140..2af5f162 100644 --- a/src/lol/math/real.h +++ b/src/lol/math/real.h @@ -157,7 +157,7 @@ public: inline Real const &operator op##=(type x) \ { \ /* If multiplying or dividing by a power of two, take a shortcut */ \ - if (m_sign && m_exponent && x && !(x & (x - 1))) \ + if (!is_zero() && x && !(x & (x - 1))) \ { \ while (x >>= 1) \ m_exponent += 1 op 2 - 1; /* 1 if op is *, -1 if op is / */ \