Fix compilation of isnan/isinf for MSVC2012.

MSVC doesn't define float versions for _isnan/_isfinite, so the double
versions need to be used. This is already done in the surrounding
functions, but not in these two.

Change-Id: Ic183358dc1790279e18d00a08b7279e76c02af60
Reviewed-by: Oliver Wolff <oliver.wolff@theqtcompany.com>
bb10
Erik Verbruggen 2015-12-11 11:31:18 +01:00
parent 0ba7df2603
commit b894dfe311
1 changed files with 2 additions and 2 deletions

View File

@ -87,8 +87,8 @@ namespace qnumeric_std_wrapper {
static inline bool isnan(double d) { return !!_isnan(d); }
static inline bool isinf(double d) { return !_finite(d) && !_isnan(d); }
static inline bool isfinite(double d) { return !!_finite(d); }
static inline bool isnan(float f) { return !!_isnanf(f); }
static inline bool isinf(float f) { return !_finitef(f) && !_isnan(f); }
static inline bool isnan(float f) { return !!_isnan(f); }
static inline bool isinf(float f) { return !_finite(f) && !_isnan(f); }
static inline bool isfinite(float f) { return !!_finite(f); }
#elif !defined(Q_CC_MSVC) && (defined(Q_OS_QNX) || !defined(__cplusplus) || __cplusplus < 201103L)
static inline bool isnan(double d) { return math_h_isnan(d); }