[Avida-SVN] r2883 - branches/movement/source/actions

grabow38 at myxo.css.msu.edu grabow38 at myxo.css.msu.edu
Mon Oct 27 04:13:08 PDT 2008


Author: grabow38
Date: 2008-10-27 07:13:08 -0400 (Mon, 27 Oct 2008)
New Revision: 2883

Modified:
   branches/movement/source/actions/PopulationActions.cc
Log:
Minor bug fix in resource consumption competition.

Modified: branches/movement/source/actions/PopulationActions.cc
===================================================================
--- branches/movement/source/actions/PopulationActions.cc	2008-10-25 22:57:34 UTC (rev 2882)
+++ branches/movement/source/actions/PopulationActions.cc	2008-10-27 11:13:08 UTC (rev 2883)
@@ -1703,8 +1703,8 @@
     double Fitness(const cDeme& deme) {    
 	
 	  cResourceCount res = deme.GetDemeResourceCount(); 
-	  double current_res;// Current total resource in deme                                                                                                            
-	  double initial_res;// Initial total resource in deme
+	  double current_res = 0.0;// Current total resource in deme                                                                                                            
+	  double initial_res = 0.0;// Initial total resource in deme
 	
 	  for(int i = 0; i < res.GetSize(); i++) {                                                                                                                        
 	    if( (res.GetResourcesGeometry())[i] != nGeometry::GLOBAL) {                                                                                                   




More information about the Avida-cvs mailing list