fix: do not count two times the evaluations in eoEvalCounterThrowException

This commit is contained in:
Johann Dreo 2020-10-09 16:15:44 +02:00
commit 0665cc02f5

View file

@ -64,20 +64,18 @@ public :
// bypass already evaluated individuals // bypass already evaluated individuals
if (eo.invalid()) { if (eo.invalid()) {
// increment the value of the self parameter // evaluate
// (eoEvalFuncCounter inherits from @see eoValueParam) this->eoEvalFuncCounter<EOT>::operator()(eo);
value()++; // No need to increment value(), it is done in the superclass.
// increment t
// if we have reached the maximum // if we have reached the maximum
if ( value() >= _threshold ) { if ( this->value() >= _threshold ) {
// go back through the stack until catched // go back through the stack until catched
throw eoMaxEvalException(_threshold); throw eoMaxEvalException(_threshold);
} }
// evaluate
this->eoEvalFuncCounter<EOT>::operator()(eo);
} // if invalid } // if invalid
} }