[Avida-SVN] r3348 - development/source/actions
ruppmatt at myxo.css.msu.edu
ruppmatt at myxo.css.msu.edu
Wed Jul 1 13:25:20 PDT 2009
Author: ruppmatt
Date: 2009-07-01 16:25:20 -0400 (Wed, 01 Jul 2009)
New Revision: 3348
Modified:
development/source/actions/PrintActions.cc
Log:
Remvoing a warning or two from PrintAction.
Modified: development/source/actions/PrintActions.cc
===================================================================
--- development/source/actions/PrintActions.cc 2009-06-30 21:10:00 UTC (rev 3347)
+++ development/source/actions/PrintActions.cc 2009-07-01 20:25:20 UTC (rev 3348)
@@ -1713,7 +1713,7 @@
tArray<double> task_prob = genotype->GetTaskProbabilities(); // get the taks probabilities
int weight = (m_weighted) ? genotype->GetNumCPUs() : 1; // get the proper tally weighting
for (int k = 0; k < task_prob.GetSize(); k++){ // For each task
- int bin_id = (task_prob[k] < 1.0) ? ceil( ( task_prob[k] * 100 ) / 5 ) : 21; // find the bin to put it into
+ int bin_id = (task_prob[k] < 1.0) ? (int) ceil( ( task_prob[k] * 100 ) / 5 ) : 21; // find the bin to put it into
m_bins(k,bin_id) += weight; // ... and tally it
}
}
@@ -1724,7 +1724,7 @@
int weight = (m_weighted) ? genotype->GetNumOrganisms() : 1;
tArray<double> task_prob = genotype->GetTaskProbabilities(ctx);
for (int k = 0; k < task_prob.GetSize(); k++){
- int bin_id = (task_prob[k] < 1.0) ? ceil( ( task_prob[k] * 100 ) / 5 ) : 21;
+ int bin_id = (task_prob[k] < 1.0) ? (int) ceil( ( task_prob[k] * 100 ) / 5 ) : 21;
m_bins(k,bin_id) += weight;
}
genotype = genotype->GetNext(); // Next gentoype
More information about the Avida-cvs
mailing list