[Genabel-commits] r1364 - pkg/ProbABEL/src

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Wed Nov 6 16:30:16 CET 2013


Author: lckarssen
Date: 2013-11-06 16:30:15 +0100 (Wed, 06 Nov 2013)
New Revision: 1364

Modified:
   pkg/ProbABEL/src/coxph_data.cpp
   pkg/ProbABEL/src/main.cpp
   pkg/ProbABEL/src/regdata.cpp
Log:
Also make ProbABEL compile without errors when adding -std=c++11 to the CXXFLAGS. See SVN r.1361 for more details; again it is a matter of replacing isnan() with std::isnan() calls to explicitely state which function we want. 


Modified: pkg/ProbABEL/src/coxph_data.cpp
===================================================================
--- pkg/ProbABEL/src/coxph_data.cpp	2013-11-06 15:05:08 UTC (rev 1363)
+++ pkg/ProbABEL/src/coxph_data.cpp	2013-11-06 15:30:15 UTC (rev 1364)
@@ -208,7 +208,7 @@
         for (int i = 0; i < nids; i++)
         {
             X.put(snpdata[i], (ncov - j - 1), order[i]);
-            if (isnan(snpdata[i]))
+            if (std::isnan(snpdata[i]))
                 masked_data[order[i]] = 1;
         }
     }

Modified: pkg/ProbABEL/src/main.cpp
===================================================================
--- pkg/ProbABEL/src/main.cpp	2013-11-06 15:05:08 UTC (rev 1363)
+++ pkg/ProbABEL/src/main.cpp	2013-11-06 15:30:15 UTC (rev 1364)
@@ -548,7 +548,7 @@
             gtd.get_var(csnp * 2 + 1, snpdata2);
             for (unsigned int ii = 0; ii < gtd.nids; ii++)
             {
-                if (!isnan(snpdata1[ii]) && !isnan(snpdata2[ii]))
+                if (!std::isnan(snpdata1[ii]) && !std::isnan(snpdata2[ii]))
                 {
                     gcount++;
                     freq += snpdata1[ii] + snpdata2[ii] * 0.5;
@@ -561,7 +561,7 @@
             gtd.get_var(csnp, snpdata1);
             for (unsigned int ii = 0; ii < gtd.nids; ii++)
             {
-                if (!isnan(snpdata1[ii]))
+                if (!std::isnan(snpdata1[ii]))
                 {
                     gcount++;
                     freq += snpdata1[ii] * 0.5;

Modified: pkg/ProbABEL/src/regdata.cpp
===================================================================
--- pkg/ProbABEL/src/regdata.cpp	2013-11-06 15:05:08 UTC (rev 1363)
+++ pkg/ProbABEL/src/regdata.cpp	2013-11-06 15:30:15 UTC (rev 1364)
@@ -111,7 +111,7 @@
         for (int i = 0; i < nids; i++)
         {
             X.put(snpdata[i], i, (ncov - j));
-            if (isnan(snpdata[i]))
+            if (std::isnan(snpdata[i]))
             {
                 masked_data[i] = 1;
             }



More information about the Genabel-commits mailing list