MSVC: Fix ambiguous call to overloaded function fpclassify()

Its called by std::isnan(), std::isinf() and std::isfinite() that are
 used in the following methods:
JKQTPimagePlot_getImageMin<T>()
JKQTPimagePlot_array2RGBimage<T>()
JKQTPimagePlot_array2image<T>()
This commit is contained in:
Razi Alavizadeh 2018-12-05 21:03:32 +03:30
parent a77d6c2847
commit 3ae8281804

View File

@ -221,7 +221,7 @@ inline double JKQTPimagePlot_getImageMin(T* dbl, int width, int height)
for (int i=1; i<width*height; ++i) for (int i=1; i<width*height; ++i)
{ {
register T v=dbl[i]; register T v=dbl[i];
if (!(std::isnan(v) || std::isinf(v))) { if (!(std::isnan(static_cast<long double>(v)) || std::isinf(static_cast<long double>(v)))) {
if (first) { if (first) {
min=max=v; min=max=v;
first=false; first=false;
@ -252,7 +252,7 @@ inline double JKQTPimagePlot_getImageMax(T* dbl, int width, int height)
for (int i=1; i<width*height; ++i) for (int i=1; i<width*height; ++i)
{ {
register T v=dbl[i]; register T v=dbl[i];
if (!(std::isnan(v) || std::isinf(v))) { if (!(std::isnan(static_cast<long double>(v)) || std::isinf(static_cast<long double>(v)))) {
if (first) { if (first) {
min=max=v; min=max=v;
first=false; first=false;
@ -296,7 +296,7 @@ inline void JKQTPimagePlot_array2RGBimage(T* dbl_in, int width, int height, QIma
for (int i=1; i<width*height; ++i) for (int i=1; i<width*height; ++i)
{ {
register T v=dbl_in[i]; register T v=dbl_in[i];
if (std::isfinite(v)) { if (std::isfinite(static_cast<long double>(v))) {
if (first) { if (first) {
min=max=v; min=max=v;
first=false; first=false;
@ -585,7 +585,7 @@ inline void JKQTPimagePlot_array2image(T* dbl_in, int width, int height, QImage
for (int i=1; i<width*height; ++i) for (int i=1; i<width*height; ++i)
{ {
register T v=dbl_in[i]; register T v=dbl_in[i];
if (!(std::isnan(v) || std::isinf(v))) { if (!(std::isnan(static_cast<long double>(v)) || std::isinf(static_cast<long double>(v)))) {
if (first) { if (first) {
min=max=v; min=max=v;
first=false; first=false;