diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2014-01-10 11:32:55 +0100 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2014-01-10 17:11:43 +0100 |
commit | ed6a2f3bb94b4ffdb2fe95e167fcb0ce38a4cb58 (patch) | |
tree | 72cccd694862b1aeaf762a424ba275f966a9dc8f /include/rtl | |
parent | 81cb6a7fbc315d3287e7a485b73a1b66dd4478ef (diff) |
Use proper bool operations
Change-Id: I6aa9cf5cb7fde0a0bb2902a0b2a9e091ed6d94ab
Diffstat (limited to 'include/rtl')
-rw-r--r-- | include/rtl/math.hxx | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/include/rtl/math.hxx b/include/rtl/math.hxx index ee82d2411d6f..041ae848ffcf 100644 --- a/include/rtl/math.hxx +++ b/include/rtl/math.hxx @@ -319,7 +319,7 @@ inline double approxCeil(double a) */ inline bool isFinite(double d) { - return SAL_MATH_FINITE(d) != 0; + return SAL_MATH_FINITE(d); } /** If a value represents +INF or -INF. @@ -331,7 +331,7 @@ inline bool isFinite(double d) inline bool isInf(double d) { // exponent==0x7ff fraction==0 - return (SAL_MATH_FINITE(d) == 0) && + return !SAL_MATH_FINITE(d) && (reinterpret_cast< sal_math_Double * >(&d)->inf_parts.fraction_hi == 0) && (reinterpret_cast< sal_math_Double * >(&d)->inf_parts.fraction_lo == 0); @@ -342,7 +342,7 @@ inline bool isInf(double d) inline bool isNan(double d) { // exponent==0x7ff fraction!=0 - return (SAL_MATH_FINITE(d) == 0) && ( + return !SAL_MATH_FINITE(d) && ( (reinterpret_cast< sal_math_Double * >(&d)->inf_parts.fraction_hi != 0) || (reinterpret_cast< sal_math_Double * >(&d)->inf_parts.fraction_lo != 0) ); |