[Avida-cvs] [Avida2-svn] r150 - trunk/source/bindings/Boost.Python

kaben at myxo.css.msu.edu kaben at myxo.css.msu.edu
Fri Apr 15 03:59:28 PDT 2005


Author: kaben
Date: 2005-04-15 06:59:28 -0400 (Fri, 15 Apr 2005)
New Revision: 150

Modified:
   trunk/source/bindings/Boost.Python/py_avida_driver-fixups.cc
Log:

* Change to Avida-ED population driver to fix tracking of changed
  population cells.



Modified: trunk/source/bindings/Boost.Python/py_avida_driver-fixups.cc
===================================================================
--- trunk/source/bindings/Boost.Python/py_avida_driver-fixups.cc	2005-04-15 10:58:36 UTC (rev 149)
+++ trunk/source/bindings/Boost.Python/py_avida_driver-fixups.cc	2005-04-15 10:59:28 UTC (rev 150)
@@ -17,9 +17,9 @@
 
 
 bool pyAvidaDriver::preUpdate(const unsigned int){
-  if (cChangeList *change_list = population->GetChangeList()) {
-    change_list->Reset();
-  }
+  //if (cChangeList *change_list = population->GetChangeList()) {
+  //  change_list->Reset();
+  //}
   GetEvents();
   if(true == done_flag){ return false; }
   // Increment the Update.
@@ -128,13 +128,13 @@
 }
 
 pyAvidaDriver::pyAvidaDriver(cEnvironment & environment)
-: cAvidaDriver_Population(environment)
-, m_update_mode_function(&pyAvidaDriver::fastUpdate)
-, m_update_stage_function(&pyAvidaDriver::preUpdate)
-, m_step_cell_id(-1)
-, m_change_list(new cChangeList())
+: cAvidaDriver_Population(environment, new cChangeList())
+, m_update_mode_function(&pyAvidaDriver::fastUpdate)// ^
+, m_update_stage_function(&pyAvidaDriver::preUpdate)// |
+, m_step_cell_id(-1)                                // |
+, m_change_list(population->GetChangeList())// <--Same as. Yuk. Problem
+                                            //    of order of initialization.
 {
-  population->SetChangeList(m_change_list);
 }
 
 pyAvidaDriver::~pyAvidaDriver(){




More information about the Avida-cvs mailing list