mirror of
https://github.com/jkriege2/JKQtPlotter.git
synced 2024-12-25 10:01:38 +08:00
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:
parent
a77d6c2847
commit
3ae8281804
@ -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;
|
||||||
|
Loading…
Reference in New Issue
Block a user