Commit 6c838823 authored by Romain Pacanowski's avatar Romain Pacanowski Committed by Laurent Belcour

[FIX] Compilation Issues on MacOS X plateforms

Changed called to isnan that are ambigous to alta::isnan to avoid
compilation error problems when using clang on MacOS X.
parent 8345431c
......@@ -8,6 +8,7 @@
License, v. 2.0. If a copy of the MPL was not distributed with this
file, You can obtain one at http://mozilla.org/MPL/2.0/. */
#include <core/common.h>
#include <core/data.h>
#include <cstdio>
......@@ -173,7 +174,7 @@ class BrdfSlice : public data {
// Safeguard. We can use either asserting or returning zero in case
// the query values are not within reach.
if(_x[0] > _max[0] || x[0] < _min[0] || x[1] > _max[1] || x[1] < _min[1] ||
isnan(_x[0]) || isnan(x[1])) {
alta::isnan(_x[0]) || alta::isnan(x[1])) {
vec res(3);
return res;
}
......
......@@ -22,9 +22,9 @@
#include <iomanip>
#include <set>
#ifdef WIN32
#define isnan(X) ((X != X))
#endif
// #ifdef WIN32
// #define isnan(X) ((X != X))
// #endif
#include <core/common.h>
......@@ -355,7 +355,7 @@ bool rational_fitter_quadprog::fit_data(const ptr<vertical_segment>& d, int np,
for(int i=0; i<np+nq; ++i)
{
const double v = x[i];
solves_qp = solves_qp && !isnan(v) && (v != std::numeric_limits<double>::infinity()) ;
solves_qp = solves_qp && !alta::isnan(v) && (v != std::numeric_limits<double>::infinity()) ;
}
if(solves_qp)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment