diff options
author | Matthew Woehlke <matthew.woehlke@kitware.com> | 2013-08-13 16:48:02 -0400 |
---|---|---|
committer | John Ehresman <jpe@wingware.com> | 2013-08-14 20:36:46 +0200 |
commit | 8287ee801965f2fbeea573e1eb652cc851920f86 (patch) | |
tree | 2406162ff4459e7a61ccaf4dbc3da7a87afb2c04 | |
parent | eb04a968b60da4e799ca89f2936a75ff63d915b1 (diff) |
Work around MSVC's deficient <cmath>1.2.1
Change libsample/transform.cpp to use the MSVC-specific _finite on
Windows, rather than std::isfinite, which MSVC does not implement.
Change-Id: If7b33e17bcb7c2e4432d670d44b559205f88796d
Reviewed-by: John Ehresman <jpe@wingware.com>
-rw-r--r-- | tests/libsample/transform.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/tests/libsample/transform.cpp b/tests/libsample/transform.cpp index 2984ed3..368a868 100644 --- a/tests/libsample/transform.cpp +++ b/tests/libsample/transform.cpp @@ -24,7 +24,13 @@ #include "transform.h" +#ifdef _WIN32 +#include <math.h> +#include <float.h> +static inline bool isfinite(double a) { return _finite(a); } +#else #include <cmath> +#endif using namespace std; |