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