From f9848393668cb2e6192bf18ff3e7421690081dcd Mon Sep 17 00:00:00 2001 From: Caner Candan Date: Wed, 30 Mar 2011 15:52:23 +0200 Subject: [PATCH] * eoOpContainer: call to eoGenOp::apply instead of operator() to avoid calling reserve --- eo/src/eoOpContainer.h | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/eo/src/eoOpContainer.h b/eo/src/eoOpContainer.h index 70252a49..d295f0ce 100644 --- a/eo/src/eoOpContainer.h +++ b/eo/src/eoOpContainer.h @@ -100,6 +100,8 @@ public: void apply(eoPopulator& _pop) { + _pop.reserve( this->max_production() ); + position_type pos = _pop.tellp(); for (size_t i = 0; i < rates.size(); ++i) { _pop.seekp(pos); @@ -108,7 +110,11 @@ public: // try // { // apply it to all the guys in the todo std::list - (*ops[i])(_pop); + + //(*ops[i])(_pop); + + ops[i]->apply(_pop); + // } // check for out of individuals and do nothing with that... // catch(eoPopulator::OutOfIndividuals&)