summaryrefslogtreecommitdiffstats
path: root/src/util/math.h
diff options
context:
space:
mode:
authorDaniel Schürmann <daschuer@mixxx.org>2015-12-12 02:23:26 +0100
committerDaniel Schürmann <daschuer@mixxx.org>2015-12-12 02:23:26 +0100
commit52a2e4335d981555df263da52a6d932dcdff2a34 (patch)
treed1d9f920f757a5769370ed4c9ddbb0fa0286fda4 /src/util/math.h
parentae6d2b52744deb2475320509bea588be303bb58a (diff)
Introduced a wrapper arround the fpclassify functions.
This is compiled without optimization and allows to use the functions from optimized code Fixes Bug #1524561
Diffstat (limited to 'src/util/math.h')
-rw-r--r--src/util/math.h17
1 files changed, 1 insertions, 16 deletions
diff --git a/src/util/math.h b/src/util/math.h
index 82afe19696..b224ec082c 100644
--- a/src/util/math.h
+++ b/src/util/math.h
@@ -8,6 +8,7 @@
#include <algorithm>
#include "util/assert.h"
+#include "util/fpclassify.h"
// If we don't do this then we get the C90 fabs from the global namespace which
// is only defined for double.
@@ -34,22 +35,6 @@ inline bool even(T value) {
return value % 2 == 0;
}
-#ifdef _MSC_VER
-// VC++ uses _isnan() instead of isnan() and !_finite instead of isinf.
-#include <float.h>
-#define isnan(x) _isnan(x)
-#define isinf(x) (!_finite(x))
-// Ask VC++ to emit an intrinsic for fabs instead of calling std::fabs.
-#pragma intrinsic(fabs)
-#else
-// for isnan() and isinf() everywhere else use the cmath version. We define
-// these as macros to prevent clashing with c++11 built-ins in the global
-// namespace. If you say "using std::isnan;" then this will fail to build with
-// std=c++11. See https://bugs.webkit.org/show_bug.cgi?id=59249 for some
-// relevant discussion.
-#define isnan std::isnan
-#define isinf std::isinf
-#endif
inline int roundUpToPowerOf2(int v) {
int power = 1;