[Genabel-commits] r1446 - pkg/ProbABEL/src
noreply at r-forge.r-project.org
noreply at r-forge.r-project.org
Tue Dec 3 11:02:30 CET 2013
Author: lckarssen
Date: 2013-12-03 11:02:30 +0100 (Tue, 03 Dec 2013)
New Revision: 1446
Modified:
pkg/ProbABEL/src/coxph_data.cpp
pkg/ProbABEL/src/regdata.cpp
Log:
Fixed another few cppcheck errors introduced recently in ProbABEL
Modified: pkg/ProbABEL/src/coxph_data.cpp
===================================================================
--- pkg/ProbABEL/src/coxph_data.cpp 2013-12-03 09:44:46 UTC (rev 1445)
+++ pkg/ProbABEL/src/coxph_data.cpp 2013-12-03 10:02:30 UTC (rev 1446)
@@ -67,16 +67,25 @@
coxph_data::coxph_data(phedata &phed, gendata &gend, const int snpnum)
{
- nids = gend.nids;
+ freq = 0;
+ gcount = 0;
+ nids = gend.nids;
masked_data = new unsigned short int[nids];
+
for (int i = 0; i < nids; i++)
+ {
masked_data[i] = 0;
+ }
ngpreds = gend.ngpreds;
if (snpnum >= 0)
+ {
ncov = phed.ncov + ngpreds;
+ }
else
+ {
ncov = phed.ncov;
+ }
if (phed.noutcomes != 2)
{
Modified: pkg/ProbABEL/src/regdata.cpp
===================================================================
--- pkg/ProbABEL/src/regdata.cpp 2013-12-03 09:44:46 UTC (rev 1445)
+++ pkg/ProbABEL/src/regdata.cpp 2013-12-03 10:02:30 UTC (rev 1446)
@@ -51,8 +51,11 @@
regdata::regdata(phedata &phed, gendata &gend, int snpnum,
bool ext_is_interaction_excluded)
{
- nids = gend.nids;
+ freq = 0;
+ gcount = 0;
+ nids = gend.nids;
masked_data = new unsigned short int[nids];
+
for (int i = 0; i < nids; i++)
{
masked_data[i] = 0;
More information about the Genabel-commits
mailing list