From 0665cc02f5c2967db024d5a67e30866e769630e5 Mon Sep 17 00:00:00 2001 From: nojhan Date: Fri, 9 Oct 2020 16:15:44 +0200 Subject: [PATCH] fix: do not count two times the evaluations in eoEvalCounterThrowException --- eo/src/eoEvalCounterThrowException.h | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/eo/src/eoEvalCounterThrowException.h b/eo/src/eoEvalCounterThrowException.h index b83699916..a17982a43 100644 --- a/eo/src/eoEvalCounterThrowException.h +++ b/eo/src/eoEvalCounterThrowException.h @@ -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::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::operator()(eo); - } // if invalid }