[Genabel-commits] r1398 - in pkg: GenABEL/src/GAlib GenABEL/src/ITERlib filevector/fvlib

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Tue Nov 19 07:19:36 CET 2013


Author: maksim
Date: 2013-11-19 07:19:36 +0100 (Tue, 19 Nov 2013)
New Revision: 1398

Modified:
   pkg/GenABEL/src/GAlib/gwaa_cpp.cpp
   pkg/GenABEL/src/ITERlib/iterator_functions.cpp
   pkg/filevector/fvlib/CastUtils.cpp
Log:
Replaced std::isnan by ISNAN as it was requested by CRAN

Modified: pkg/GenABEL/src/GAlib/gwaa_cpp.cpp
===================================================================
--- pkg/GenABEL/src/GAlib/gwaa_cpp.cpp	2013-11-18 23:33:21 UTC (rev 1397)
+++ pkg/GenABEL/src/GAlib/gwaa_cpp.cpp	2013-11-19 06:19:36 UTC (rev 1398)
@@ -131,7 +131,7 @@
 		if (indata) {
 			unsigned int i;
 			for(i=0;i<indataHeight*indataWidth;i++) {
-				if (isnan(indata[i])) gt[i] = 0;
+				if (ISNAN(indata[i])) gt[i] = 0;
 				else gt[i] = 1 + (unsigned int) indata[i];
 				//Rprintf(" %f %d;",indata[i],gt[i]);
 			}

Modified: pkg/GenABEL/src/ITERlib/iterator_functions.cpp
===================================================================
--- pkg/GenABEL/src/ITERlib/iterator_functions.cpp	2013-11-18 23:33:21 UTC (rev 1397)
+++ pkg/GenABEL/src/ITERlib/iterator_functions.cpp	2013-11-19 06:19:36 UTC (rev 1398)
@@ -34,7 +34,7 @@
                 //Rprintf("%f\n", mydata[0]);
                 for (register unsigned int i = 0; i < size; i++) {
 
-                    if (!std::isnan(mydata[i])) {
+                    if (!ISNAN(mydata[i])) {
                                 sumtotal += mydata[i];
                         } else if (!dropNA) {
                                 return(0/zero);

Modified: pkg/filevector/fvlib/CastUtils.cpp
===================================================================
--- pkg/filevector/fvlib/CastUtils.cpp	2013-11-18 23:33:21 UTC (rev 1397)
+++ pkg/filevector/fvlib/CastUtils.cpp	2013-11-19 06:19:36 UTC (rev 1398)
@@ -184,9 +184,9 @@
     	case INT:
     	    return (*(int*) data) == INT_NAN;
     	case FLOAT:
-	  return std::isnan(*(float*) data);
+	  return ISNAN(*(float*) data);
     	case DOUBLE:
-	  return std::isnan(*(double*)data);
+	  return ISNAN(*(double*)data);
     	case UNSIGNED_CHAR:
     	    return (*(unsigned char*) data) == UNSIGNED_CHAR_NAN;
     	case SIGNED_CHAR:



More information about the Genabel-commits mailing list