sci-visualization/spyview: Fix some more missing std::, bug 615966
authorAndreas K. Huettel <dilfridge@gentoo.org>
Tue, 18 Apr 2017 16:36:22 +0000 (18:36 +0200)
committerAndreas K. Huettel <dilfridge@gentoo.org>
Tue, 18 Apr 2017 16:36:22 +0000 (18:36 +0200)
Package-Manager: Portage-2.3.5, Repoman-2.3.2

sci-visualization/spyview/files/spyview-20150124-gcc6cxx14-2.patch [new file with mode: 0644]
sci-visualization/spyview/spyview-20150124-r1.ebuild

diff --git a/sci-visualization/spyview/files/spyview-20150124-gcc6cxx14-2.patch b/sci-visualization/spyview/files/spyview-20150124-gcc6cxx14-2.patch
new file mode 100644 (file)
index 0000000..f23838c
--- /dev/null
@@ -0,0 +1,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);
index 918ef565f6c8d2500a726dec173f1e51deee5198..1454c18c92425c205347eff0e46cf4b793f3d765 100644 (file)
@@ -31,6 +31,7 @@ RDEPEND="${COMMON_DEPEND}
 PATCHES=(
        "${FILESDIR}/${P}"-gnuplot_interface_fix.patch
        "${FILESDIR}/${P}"-gcc6cxx14.patch
+       "${FILESDIR}/${P}"-gcc6cxx14-2.patch
 )
 
 src_unpack() {