[Avida-SVN] r1966 - in development: Avida.xcodeproj source/cpu source/main source/tools
brysonda at myxo.css.msu.edu
brysonda at myxo.css.msu.edu
Mon Aug 20 12:50:58 PDT 2007
Author: brysonda
Date: 2007-08-20 15:50:58 -0400 (Mon, 20 Aug 2007)
New Revision: 1966
Modified:
development/Avida.xcodeproj/project.pbxproj
development/source/cpu/cTestCPU.h
development/source/cpu/cTestCPUInterface.cc
development/source/cpu/cTestCPUInterface.h
development/source/main/cEnvironment.cc
development/source/main/cOrgInterface.h
development/source/main/cPopulation.cc
development/source/main/cPopulationCell.cc
development/source/main/cPopulationCell.h
development/source/main/cPopulationInterface.cc
development/source/main/cPopulationInterface.h
development/source/tools/tList.h
Log:
- Clean up cPopulationCell somewhat, most importantly adding proper cleanup of cMutationRates on destruction
- Adjust access method to the inputs to prevent unnecessary copying, especially in environments with larger input arrays
- *FIX* incorrect implementation of cEnvironment::SwapInputs that was essentially duplicating one of the input arrays, rather than copying it (similar to the Birth Chamber bug a while back). This affects cPopulation::MoveOrganisms().
Modified: development/Avida.xcodeproj/project.pbxproj
===================================================================
--- development/Avida.xcodeproj/project.pbxproj 2007-08-20 18:53:11 UTC (rev 1965)
+++ development/Avida.xcodeproj/project.pbxproj 2007-08-20 19:50:58 UTC (rev 1966)
@@ -363,8 +363,6 @@
56F555D00C3B364E00E2E929 /* avida-text */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.executable"; includeInIndex = 0; path = "avida-text"; sourceTree = BUILT_PRODUCTS_DIR; };
56F555DF0C3B402A00E2E929 /* cDriver_TextViewer.cc */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = cDriver_TextViewer.cc; sourceTree = "<group>"; };
56F555E00C3B402A00E2E929 /* cDriver_TextViewer.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = cDriver_TextViewer.h; sourceTree = "<group>"; };
- 56F555E10C3B402A00E2E929 /* cTextViewerManager.cc */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = cTextViewerManager.cc; sourceTree = "<group>"; };
- 56F555E20C3B402A00E2E929 /* cTextViewerManager.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = cTextViewerManager.h; sourceTree = "<group>"; };
56F555E30C3B402A00E2E929 /* LAYOUT */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text; path = LAYOUT; sourceTree = "<group>"; };
56F555E40C3B402A00E2E929 /* viewer-text.cc */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = "viewer-text.cc"; sourceTree = "<group>"; };
7005A70109BA0FA90007E16E /* cTestCPUInterface.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = cTestCPUInterface.h; sourceTree = "<group>"; };
@@ -919,8 +917,6 @@
5629D80F0C3EE13500C5F152 /* ncurses-defs.h */,
56F555DF0C3B402A00E2E929 /* cDriver_TextViewer.cc */,
56F555E00C3B402A00E2E929 /* cDriver_TextViewer.h */,
- 56F555E10C3B402A00E2E929 /* cTextViewerManager.cc */,
- 56F555E20C3B402A00E2E929 /* cTextViewerManager.h */,
56F555E30C3B402A00E2E929 /* LAYOUT */,
56F555E40C3B402A00E2E929 /* viewer-text.cc */,
);
Modified: development/source/cpu/cTestCPU.h
===================================================================
--- development/source/cpu/cTestCPU.h 2007-08-20 18:53:11 UTC (rev 1965)
+++ development/source/cpu/cTestCPU.h 2007-08-20 19:50:58 UTC (rev 1966)
@@ -100,7 +100,7 @@
inline int GetInput();
inline int GetInputAt(int & input_pointer);
- tArray<int> GetInputs() {return input_array;}
+ inline const tArray<int>& GetInputs() const { return input_array; }
void ResetInputs(cAvidaContext& ctx);
inline int GetReceiveValue();
Modified: development/source/cpu/cTestCPUInterface.cc
===================================================================
--- development/source/cpu/cTestCPUInterface.cc 2007-08-20 18:53:11 UTC (rev 1965)
+++ development/source/cpu/cTestCPUInterface.cc 2007-08-20 19:50:58 UTC (rev 1966)
@@ -60,7 +60,7 @@
m_testcpu->ResetInputs(ctx);
}
-tArray<int> cTestCPUInterface::GetInputs()
+const tArray<int>& cTestCPUInterface::GetInputs() const
{
return m_testcpu->GetInputs();
}
Modified: development/source/cpu/cTestCPUInterface.h
===================================================================
--- development/source/cpu/cTestCPUInterface.h 2007-08-20 18:53:11 UTC (rev 1965)
+++ development/source/cpu/cTestCPUInterface.h 2007-08-20 19:50:58 UTC (rev 1966)
@@ -56,7 +56,7 @@
void Breakpoint() { ; }
int GetInputAt(int& input_pointer);
void ResetInputs(cAvidaContext& ctx);
- tArray<int> GetInputs();
+ const tArray<int>& GetInputs() const;
int Debug();
const tArray<double>& GetResources();
const tArray<double>& GetDemeResources(int deme_id);
Modified: development/source/main/cEnvironment.cc
===================================================================
--- development/source/main/cEnvironment.cc 2007-08-20 18:53:11 UTC (rev 1965)
+++ development/source/main/cEnvironment.cc 2007-08-20 19:50:58 UTC (rev 1966)
@@ -813,12 +813,10 @@
void cEnvironment::SwapInputs(cAvidaContext& ctx, tArray<int>& src_input_array, tArray<int>& dest_input_array) const
{
- tArray<int>& tmp_input_array = dest_input_array;
+ tArray<int> tmp_input_array = dest_input_array;
- // Just swap the pointers around.
dest_input_array = src_input_array;
- src_input_array = tmp_input_array;
-
+ src_input_array = tmp_input_array;
}
Modified: development/source/main/cOrgInterface.h
===================================================================
--- development/source/main/cOrgInterface.h 2007-08-20 18:53:11 UTC (rev 1965)
+++ development/source/main/cOrgInterface.h 2007-08-20 19:50:58 UTC (rev 1966)
@@ -65,7 +65,7 @@
virtual void Breakpoint() = 0;
virtual int GetInputAt(int& input_pointer) = 0;
virtual void ResetInputs(cAvidaContext& ctx) = 0;
- virtual tArray<int> GetInputs() = 0;
+ virtual const tArray<int>& GetInputs() const = 0;
virtual int Debug() = 0;
virtual const tArray<double>& GetResources() = 0;
virtual const tArray<double>& GetDemeResources(int deme_id) = 0;
Modified: development/source/main/cPopulation.cc
===================================================================
--- development/source/main/cPopulation.cc 2007-08-20 18:53:11 UTC (rev 1965)
+++ development/source/main/cPopulation.cc 2007-08-20 19:50:58 UTC (rev 1966)
@@ -118,7 +118,7 @@
}
// Allocate the cells, resources, and market.
- cell_array.Resize(num_cells);
+ cell_array.ResizeClear(num_cells);
// resource_count.ResizeSpatialGrids(world_x, world_y);
market.Resize(MARKET_SIZE);
@@ -326,12 +326,12 @@
// Reset inputs and re-calculate merit if required
if (m_world->GetConfig().RESET_INPUTS_ON_DIVIDE.Get() > 0){
- environment.SetupInputs(ctx, parent_cell.input_array);
+ environment.SetupInputs(ctx, parent_cell.m_inputs);
int pc_phenotype = m_world->GetConfig().PRECALC_PHENOTYPE.Get();
if (pc_phenotype){
cCPUTestInfo test_info;
cTestCPU* test_cpu = m_world->GetHardwareManager().CreateTestCPU();
- test_info.UseManualInputs(parent_cell.input_array); // Test using what the environment will be
+ test_info.UseManualInputs(parent_cell.GetInputs()); // Test using what the environment will be
test_cpu->TestGenome(ctx, test_info, parent_organism.GetHardware().GetMemory()); // Use the true genome
if (pc_phenotype & 1) // If we must update the merit
parent_phenotype.SetMerit(test_info.GetTestPhenotype().GetMerit());
@@ -387,7 +387,7 @@
int num_neighbors = parent.GetNeighborhoodSize();
cOrganism* target_organism =
- parent_cell.connection_list.GetPos(m_world->GetRandom().GetUInt(num_neighbors))->GetOrganism();
+ parent_cell.ConnectionList().GetPos(m_world->GetRandom().GetUInt(num_neighbors))->GetOrganism();
if (target_organism == NULL) return false;
@@ -445,17 +445,17 @@
// Update the contents of the target cell.
KillOrganism(target_cell);
- target_cell.InsertOrganism(*in_organism);
+ target_cell.InsertOrganism(in_organism);
// Setup the inputs in the target cell.
- environment.SetupInputs(ctx, target_cell.input_array);
+ environment.SetupInputs(ctx, target_cell.m_inputs);
// Precalculate the phenotype if requested
int pc_phenotype = m_world->GetConfig().PRECALC_PHENOTYPE.Get();
if (pc_phenotype){
cCPUTestInfo test_info;
cTestCPU* test_cpu = m_world->GetHardwareManager().CreateTestCPU();
- test_info.UseManualInputs(target_cell.input_array); // Test using what the environment will be
+ test_info.UseManualInputs(target_cell.GetInputs()); // Test using what the environment will be
test_cpu->TestGenome(ctx, test_info, in_organism->GetHardware().GetMemory()); // Use the true genome
if (pc_phenotype & 1)
@@ -528,7 +528,7 @@
#endif
// Swap inputs between cells to fix bus error when Avidian moves into an unoccupied cell
- environment.SwapInputs(ctx, src_cell.input_array, dest_cell.input_array);
+ environment.SwapInputs(ctx, src_cell.m_inputs, dest_cell.m_inputs);
// Find neighborhood size for facing
if (NULL != dest_cell.GetOrganism()) {
@@ -807,14 +807,14 @@
cOrganism * org2 = cell2.RemoveOrganism();
//cout << "SwapCells: organism 2 is non-null, fix up source cell" << endl;
if (org2 != NULL) {
- cell1.InsertOrganism(*org2);
+ cell1.InsertOrganism(org2);
schedule->Adjust(cell1.GetID(), org2->GetPhenotype().GetMerit());
} else {
schedule->Adjust(cell1.GetID(), cMerit(0));
}
//cout << "SwapCells: organism 1 is non-null, fix up dest cell" << endl;
if (org1 != NULL) {
- cell2.InsertOrganism(*org1);
+ cell2.InsertOrganism(org1);
schedule->Adjust(cell2.GetID(), org1->GetPhenotype().GetMerit());
} else {
schedule->Adjust(cell2.GetID(), cMerit(0));
@@ -2419,7 +2419,6 @@
// Next check organisms...
for (int i = 0; i < cell_array.GetSize(); i++) {
- if (cell_array[i].OK() == false) return false;
assert(cell_array[i].GetID() == i);
}
Modified: development/source/main/cPopulationCell.cc
===================================================================
--- development/source/main/cPopulationCell.cc 2007-08-20 18:53:11 UTC (rev 1965)
+++ development/source/main/cPopulationCell.cc 2007-08-20 19:50:58 UTC (rev 1966)
@@ -35,74 +35,69 @@
using namespace std;
-cPopulationCell::cPopulationCell()
- : m_world(NULL)
- , organism(NULL)
- , mutation_rates(NULL)
- , organism_count(0)
-{
-}
-
cPopulationCell::cPopulationCell(const cPopulationCell& in_cell)
: m_world(in_cell.m_world)
- , organism(in_cell.organism)
- , input_array(in_cell.input_array)
- , cell_id(in_cell.cell_id)
- , deme_id(in_cell.deme_id)
- , organism_count(in_cell.organism_count)
+ , m_organism(in_cell.m_organism)
+ , m_inputs(in_cell.m_inputs)
+ , m_cell_id(in_cell.m_cell_id)
+ , m_deme_id(in_cell.m_deme_id)
+ , m_organism_count(in_cell.m_organism_count)
{
- mutation_rates = new cMutationRates(*in_cell.mutation_rates);
- tConstListIterator<cPopulationCell> conn_it(in_cell.connection_list);
+ // Copy the mutation rates into a new structure
+ m_mut_rates = new cMutationRates(*in_cell.m_mut_rates);
+
+ // Copy the connection list
+ tConstListIterator<cPopulationCell> conn_it(in_cell.m_connections);
cPopulationCell* test_cell;
- while ( (test_cell = (cPopulationCell*) conn_it.Next()) != NULL) {
- connection_list.PushRear(test_cell);
- }
+ while ((test_cell = const_cast<cPopulationCell*>(conn_it.Next()))) m_connections.PushRear(test_cell);
}
void cPopulationCell::operator=(const cPopulationCell& in_cell)
{
m_world = in_cell.m_world;
- organism = in_cell.organism;
- input_array = in_cell.input_array;
- cell_id = in_cell.cell_id;
- deme_id = in_cell.deme_id;
- organism_count = in_cell.organism_count;
- if (mutation_rates == NULL)
- mutation_rates = new cMutationRates(*in_cell.mutation_rates);
+ m_organism = in_cell.m_organism;
+ m_inputs = in_cell.m_inputs;
+ m_cell_id = in_cell.m_cell_id;
+ m_deme_id = in_cell.m_deme_id;
+ m_organism_count = in_cell.m_organism_count;
+
+ // Copy the mutation rates, constructing the structure as necessary
+ if (m_mut_rates == NULL)
+ m_mut_rates = new cMutationRates(*in_cell.m_mut_rates);
else
- mutation_rates->Copy(*in_cell.mutation_rates);
- tConstListIterator<cPopulationCell> conn_it(in_cell.connection_list);
- cPopulationCell * test_cell;
- while ( (test_cell = (cPopulationCell *) conn_it.Next()) != NULL) {
- connection_list.PushRear(test_cell);
- }
+ m_mut_rates->Copy(*in_cell.m_mut_rates);
+
+ // Copy the connection list
+ tConstListIterator<cPopulationCell> conn_it(in_cell.m_connections);
+ cPopulationCell* test_cell;
+ while ((test_cell = const_cast<cPopulationCell*>(conn_it.Next()))) m_connections.PushRear(test_cell);
}
void cPopulationCell::Setup(cWorld* world, int in_id, const cMutationRates& in_rates, int x, int y)
{
m_world = world;
- cell_id = in_id;
+ m_cell_id = in_id;
m_x = x;
m_y = y;
- deme_id = -1;
+ m_deme_id = -1;
- if (mutation_rates == NULL)
- mutation_rates = new cMutationRates(in_rates);
+ if (m_mut_rates == NULL)
+ m_mut_rates = new cMutationRates(in_rates);
else
- mutation_rates->Copy(in_rates);
+ m_mut_rates->Copy(in_rates);
}
-void cPopulationCell::Rotate(cPopulationCell & new_facing)
+void cPopulationCell::Rotate(cPopulationCell& new_facing)
{
// @CAO Note, this breaks avida if new_facing is not in connection_list
#ifdef DEBUG
int scan_count = 0;
#endif
- while (connection_list.GetFirst() != &new_facing) {
- connection_list.CircNext();
+ while (m_connections.GetFirst() != &new_facing) {
+ m_connections.CircNext();
#ifdef DEBUG
- assert(++scan_count < connection_list.GetSize());
+ assert(++scan_count < m_connections.GetSize());
#endif
}
}
@@ -150,55 +145,26 @@
if(lr==1 && du==0) return 5; //E
if(lr==1 && du==-1) return 4; //SE
- assert(false);
+ assert(false);
}
-int cPopulationCell::GetInputAt(int & input_pointer)
-{
- input_pointer %= input_array.GetSize();
- return input_array[input_pointer++];
-}
-
-int cPopulationCell::GetInput(int id)
-{
- assert(id >= 0 && id < input_array.GetSize());
- return input_array[id];
-}
-
void cPopulationCell::ResetInputs(cAvidaContext& ctx)
{
- m_world->GetEnvironment().SetupInputs(ctx, input_array);
+ m_world->GetEnvironment().SetupInputs(ctx, m_inputs);
}
-void cPopulationCell::InsertOrganism(cOrganism & new_org)
+void cPopulationCell::InsertOrganism(cOrganism* new_org)
{
- assert(&new_org != NULL);
- assert(new_org.GetGenotype() != NULL);
- assert(organism == NULL);
+ assert(new_org != NULL);
+ assert(new_org->GetGenotype() != NULL);
+ assert(m_organism == NULL);
// Adjust this cell's attributes to account for the new organism.
- organism = &new_org;
- organism_count++;
+ m_organism = new_org;
+ m_organism_count++;
// Adjust the organism's attributes to match this cell.
- organism->GetOrgInterface().SetCellID(cell_id);
- organism->GetOrgInterface().SetDemeID(deme_id);
+ m_organism->GetOrgInterface().SetCellID(m_cell_id);
+ m_organism->GetOrgInterface().SetDemeID(m_deme_id);
}
-
-cOrganism * cPopulationCell::RemoveOrganism()
-{
- if (organism == NULL) return NULL; // Nothing to do!
-
- // For the moment, the cell doesn't keep track of much...
- cOrganism * out_organism = organism;
- organism = NULL;
- return out_organism;
-}
-
-
-bool cPopulationCell::OK()
-{
- // Nothing for the moment...
- return true;
-}
Modified: development/source/main/cPopulationCell.h
===================================================================
--- development/source/main/cPopulationCell.h 2007-08-20 18:53:11 UTC (rev 1965)
+++ development/source/main/cPopulationCell.h 2007-08-20 19:50:58 UTC (rev 1966)
@@ -46,67 +46,74 @@
class cPopulationCell
{
friend class cPopulation;
+
private:
cWorld* m_world;
- cOrganism* organism; // The occupent of this cell.
- tList<cPopulationCell> connection_list; // A list of neighboring cells.
- cMutationRates* mutation_rates; // Mutation rates at this cell.
- tArray<int> input_array; // Environmental Inputs...
+ cOrganism* m_organism; // The occupent of this cell.
+ tList<cPopulationCell> m_connections; // A list of neighboring cells.
+ cMutationRates* m_mut_rates; // Mutation rates at this cell.
+ tArray<int> m_inputs; // Environmental Inputs...
- int cell_id; // Unique id for position of cell in population.
- int deme_id; // ID of the deme that this cell is part of.
- int organism_count; // Total number of orgs to ever inhabit this cell.
+ int m_cell_id; // Unique id for position of cell in population.
+ int m_deme_id; // ID of the deme that this cell is part of.
+ int m_organism_count; // Total number of orgs to ever inhabit this cell.
- //location in population
+ // location in population
int m_x; //!< The x-coordinate of the position of this cell in the environment.
int m_y; //!< The y-coordinate of the position of this cell in the environment.
- void InsertOrganism(cOrganism & new_org);
- cOrganism* RemoveOrganism();
+
+ void InsertOrganism(cOrganism* new_org);
+ inline cOrganism* RemoveOrganism();
+
public:
- cPopulationCell();
+ cPopulationCell() : m_world(NULL), m_organism(NULL), m_mut_rates(NULL), m_organism_count(0) { ; }
cPopulationCell(const cPopulationCell& in_cell);
- ~cPopulationCell() { ; }
+ ~cPopulationCell() { delete m_mut_rates; }
void operator=(const cPopulationCell& in_cell);
- void Setup(cWorld* world, int in_id, const cMutationRates & in_rates, int x, int y);
- void SetDemeID(int in_id) { deme_id = in_id; }
- void Rotate(cPopulationCell & new_facing);
+ void Setup(cWorld* world, int in_id, const cMutationRates& in_rates, int x, int y);
+ void SetDemeID(int in_id) { m_deme_id = in_id; }
+ void Rotate(cPopulationCell& new_facing);
- cOrganism* GetOrganism() const { return organism; }
- tList<cPopulationCell> & ConnectionList() { return connection_list; }
- cPopulationCell & GetCellFaced() { return *(connection_list.GetFirst()); }
+ inline cOrganism* GetOrganism() const { return m_organism; }
+ inline tList<cPopulationCell>& ConnectionList() { return m_connections; }
+ inline cPopulationCell& GetCellFaced() { return *(m_connections.GetFirst()); }
int GetFacing(); // Returns the facing of this cell.
- void GetPosition(int& x, int& y) { x = m_x; y = m_y; } // Retrieves the position (x,y) coordinates of this cell.
- const cMutationRates & MutationRates() const { return *mutation_rates; }
- cMutationRates & MutationRates() { return *mutation_rates; }
- int GetInput(int);
- tArray<int> GetInputs() {return input_array;}
- int GetInputAt(int & input_pointer);
- int GetInputSize() { return input_array.GetSize(); }
+ inline void GetPosition(int& x, int& y) { x = m_x; y = m_y; } // Retrieves the position (x,y) coordinates of this cell.
+ inline const cMutationRates& MutationRates() const { assert(m_mut_rates); return *m_mut_rates; }
+ inline cMutationRates& MutationRates() { assert(m_mut_rates); return *m_mut_rates; }
+
+ inline int GetInput(int) const { return m_inputs[m_cell_id]; }
+ inline const tArray<int>& GetInputs() const { return m_inputs; }
+ inline int GetInputAt(int& input_pointer);
+ inline int GetInputSize() { return m_inputs.GetSize(); }
void ResetInputs(cAvidaContext& ctx);
- int GetID() const { return cell_id; }
- int GetDemeID() const { return deme_id; }
- int GetOrganismCount() const { return organism_count; }
+ inline int GetID() const { return m_cell_id; }
+ inline int GetDemeID() const { return m_deme_id; }
+ inline int GetOrganismCount() const { return m_organism_count; }
- bool IsOccupied() const { return organism != NULL; }
-
- bool OK();
+ inline bool IsOccupied() const { return m_organism != NULL; }
};
-#ifdef ENABLE_UNIT_TESTS
-namespace nPopulationCell {
- /**
- * Run unit tests
- *
- * @param full Run full test suite; if false, just the fast tests.
- **/
- void UnitTests(bool full = false);
+inline cOrganism* cPopulationCell::RemoveOrganism()
+{
+ cOrganism* out_organism = m_organism;
+ m_organism = NULL;
+ return out_organism;
}
-#endif
+
+inline int cPopulationCell::GetInputAt(int& input_pointer)
+{
+ input_pointer %= m_inputs.GetSize();
+ return m_inputs[input_pointer++];
+}
+
+
+
#endif
Modified: development/source/main/cPopulationInterface.cc
===================================================================
--- development/source/main/cPopulationInterface.cc 2007-08-20 18:53:11 UTC (rev 1965)
+++ development/source/main/cPopulationInterface.cc 2007-08-20 19:50:58 UTC (rev 1966)
@@ -92,7 +92,7 @@
m_world->GetPopulation().GetCell(m_cell_id).ResetInputs(ctx);
}
-tArray<int> cPopulationInterface::GetInputs()
+const tArray<int>& cPopulationInterface::GetInputs() const
{
return m_world->GetPopulation().GetCell(m_cell_id).GetInputs();
}
Modified: development/source/main/cPopulationInterface.h
===================================================================
--- development/source/main/cPopulationInterface.h 2007-08-20 18:53:11 UTC (rev 1965)
+++ development/source/main/cPopulationInterface.h 2007-08-20 19:50:58 UTC (rev 1966)
@@ -67,7 +67,7 @@
void Breakpoint() { m_world->GetDriver().SignalBreakpoint(); }
int GetInputAt(int& input_pointer);
void ResetInputs(cAvidaContext& ctx);
- tArray<int> GetInputs();
+ const tArray<int>& GetInputs() const;
int Debug();
const tArray<double>& GetResources();
const tArray<double>& GetDemeResources(int deme_id);
Modified: development/source/tools/tList.h
===================================================================
--- development/source/tools/tList.h 2007-08-20 18:53:11 UTC (rev 1965)
+++ development/source/tools/tList.h 2007-08-20 19:50:58 UTC (rev 1966)
@@ -562,8 +562,8 @@
list.AddIterator(this);
}
-template <class T> tListIterator<T>::tListIterator(tListIterator<T> & _tli)
-:list(_tli.list), node(_tli.node)
+template <class T> tListIterator<T>::tListIterator(tListIterator<T>& _tli)
+: tBaseIterator<T>(), list(_tli.list), node(_tli.node)
{
list.AddIterator(this);
}
More information about the Avida-cvs
mailing list