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

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Mon Apr 28 23:01:02 CEST 2014


Author: lckarssen
Date: 2014-04-28 23:01:01 +0200 (Mon, 28 Apr 2014)
New Revision: 1715

Modified:
   pkg/ProbABEL/src/coxph_data.cpp
   pkg/ProbABEL/src/regdata.cpp
Log:
Fixed a few cppcheck warnings by initialising some variables in initialisation lists.


Modified: pkg/ProbABEL/src/coxph_data.cpp
===================================================================
--- pkg/ProbABEL/src/coxph_data.cpp	2014-04-28 20:47:50 UTC (rev 1714)
+++ pkg/ProbABEL/src/coxph_data.cpp	2014-04-28 21:01:01 UTC (rev 1715)
@@ -92,19 +92,19 @@
  * object.
  */
 coxph_data::coxph_data(const coxph_data &obj) : X(obj.X),
+                                                stime(obj.stime),
                                                 sstat(obj.sstat),
+                                                weights(obj.weights),
                                                 offset(obj.offset),
                                                 strata(obj.strata),
-                                                order(obj.order)
+                                                order(obj.order),
+                                                masked_data(obj.masked_data)
 {
     nids        = obj.nids;
     ncov        = obj.ncov;
     ngpreds     = obj.ngpreds;
-    weights     = obj.weights;
-    stime       = obj.stime;
     gcount      = 0;
     freq        = 0;
-    masked_data = obj.masked_data;
 }
 
 

Modified: pkg/ProbABEL/src/regdata.cpp
===================================================================
--- pkg/ProbABEL/src/regdata.cpp	2014-04-28 20:47:50 UTC (rev 1714)
+++ pkg/ProbABEL/src/regdata.cpp	2014-04-28 21:01:01 UTC (rev 1715)
@@ -70,7 +70,8 @@
  * \param obj Reference to the regdata object to be copied to the new
  * object
  */
-regdata::regdata(const regdata &obj) : X(obj.X), Y(obj.Y)
+regdata::regdata(const regdata &obj) : masked_data(obj.masked_data),
+                                       X(obj.X), Y(obj.Y)
 {
     nids = obj.nids;
     ncov = obj.ncov;
@@ -79,7 +80,6 @@
     gcount = obj.gcount;
     freq = obj.freq;
     is_interaction_excluded = obj.is_interaction_excluded;
-    masked_data = obj.masked_data;
 }
 
 



More information about the Genabel-commits mailing list