Commit cabddd28 authored by George Zagaris's avatar George Zagaris
Browse files

COMP: Replace fmin/fmax with min/max for Windows

Looking a little deeper in to this it turns out that fmin/fmax
introduced in C99 is not supported by VC++. VC++ does not implement
all the provisions. Replaced those calls with std::min, std::max
defined by STL algorithm which should hopefuly resolve this issue
on windows.

Change-Id: Id1df0874fe2ec93f84ee8d872a629f018fcd49e2
parent f12bfd23
......@@ -1080,15 +1080,15 @@ void vtkAMRResampleFilter::AdjustNumberOfSamplesInRegion(
if (bdir == 0)
{
N[0] = fmin(N[0], fmax(N[1], N[2]));
N[0] = std::min(N[0], std::max(N[1], N[2]));
}
else if (bdir == 1)
{
N[1] = fmin(N[1], fmax(N[0], N[2]));
N[1] = std::min(N[1], std::max(N[0], N[2]));
}
else
{
N[2] = fmin(N[2], fmax(N[0], N[1]));
N[2] = std::min(N[2], std::max(N[0], N[1]));
}
std::cerr << "Adjusted Grid Dim: " << N[0] << ", " << N[1] << ", " << N[2] << "\n";
}
......
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