1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
|
diff --git a/spyview/ImageData.C b/spyview/ImageData.C
index a9b2c17..29decea 100644
--- a/spyview/ImageData.C
+++ b/spyview/ImageData.C
@@ -180,12 +180,12 @@ void ImageData::load_int(int *data,
double y1, double y2,
double z1, double z2)
{
- xmin = isnan(x1) ? x1 : 0;
- xmax = isnan(x2) ? x2 : width-1;
- ymin = isnan(y1) ? y1 : 0;
- ymax = isnan(y2) ? y2 : height-1;
- qmin = isnan(z1) ? z1 : 0;
- qmax = isnan(z2) ? z2 : QUANT_MAX;
+ xmin = std::isnan(x1) ? x1 : 0;
+ xmax = std::isnan(x2) ? x2 : width-1;
+ ymin = std::isnan(y1) ? y1 : 0;
+ ymax = std::isnan(y2) ? y2 : height-1;
+ qmin = std::isnan(z1) ? z1 : 0;
+ qmax = std::isnan(z2) ? z2 : QUANT_MAX;
width = w;
height = h;
@@ -214,10 +214,10 @@ void ImageData::load_raw(double *data,
double x1, double x2,
double y1, double y2)
{
- xmin = isnan(x1) ? x1 : 0;
- xmax = isnan(x2) ? x2 : width-1;
- ymin = isnan(y1) ? y1 : 0;
- ymax = isnan(y2) ? y2 : height-1;
+ xmin = std::isnan(x1) ? x1 : 0;
+ xmax = std::isnan(x2) ? x2 : width-1;
+ ymin = std::isnan(y1) ? y1 : 0;
+ ymax = std::isnan(y2) ? y2 : height-1;
width = w;
height = h;
@@ -762,7 +762,7 @@ int ImageData::load_Delft(const char *name)
//if (sscanf(linebuffer, "%*f\t%lf\t%lf", &last_sweep, &last_data) != 2)
last_data = parse_reading(linebuffer, gp_column);
- if (isnan(last_data))
+ if (std::isnan(last_data))
{
//info("line\n%s\ncgp_column %d\nval %e\n", linebuffer, gp_column, last_data);
badfilec("invalid data in delft file at line %d\nline: %s\n", nread, linebuffer);
@@ -1116,7 +1116,7 @@ void ImageData::gamma(double gamma, double epsilon)
v2 = pow(v1, gamma);
//if (!isfinite(v2))
//info("v1 %e v2 %e eps %e\n", v1, v2, epsilon);
- if (isnan(v2))
+ if (std::isnan(v2))
raw_data[i] = 0;
else
raw_data[i] = v2;
@@ -2385,7 +2385,7 @@ int MTX_Data::load_file(const char *name)
float tmp;
if (fread(&tmp, bytes, 1, fp) != 1)
badfilec( "Short read on mtx file: %s", filename.c_str());
- if (isnan(tmp)) warn( "nan at %d %d %d", i, j, k);
+ if (std::isnan(tmp)) warn( "nan at %d %d %d", i, j, k);
getData(i,j,k) = tmp;
}
else if (bytes == 8)
@@ -3419,7 +3419,7 @@ int MTX_Data::load_dat_meta(const char *name, int col)
else // otherwise try to get new data
{
val = nextreading(fp, col, lnum);
- if (isnan(val)) // failed to read a point
+ if (std::isnan(val)) // failed to read a point
{
if (npoints == 0)
{
diff --git a/spyview/ImageWindow.C b/spyview/ImageWindow.C
index 134b198..e1a8ecb 100644
--- a/spyview/ImageWindow.C
+++ b/spyview/ImageWindow.C
@@ -696,7 +696,7 @@ int ImageWindow::handle(int event)
*/
case FL_PUSH:
- if(isnan(lastFocus) && stupid_windows_focus)
+ if(std::isnan(lastFocus) && stupid_windows_focus)
{
fprintf(stderr,"Ate unfocused click. This apparently never happens.\n");
hungryFocus = true;
diff --git a/spyview/bisector.H b/spyview/bisector.H
index 039c5ff..4326da7 100644
--- a/spyview/bisector.H
+++ b/spyview/bisector.H
@@ -105,18 +105,18 @@ public:
}
else
{
- if(fxp < 0 && (isnan(x1) || (fxp > fx1)))
+ if(fxp < 0 && (std::isnan(x1) || (fxp > fx1)))
{
x1 = xp;
fx1 = fxp;
}
- else if(fxp > 0 && (isnan(x2) || (fxp < fx2)))
+ else if(fxp > 0 && (std::isnan(x2) || (fxp < fx2)))
{
x2 = xp;
fx2 = fxp;
}
}
- bisection = !(isnan(x1) || isnan(x2));
+ bisection = !(std::isnan(x1) || std::isnan(x2));
if(bisection)
{
// printf("Bisection step: [%g,%g] {%g,%g}\n", x1,x2,fx1,fx2);
|