fix: remove a lot of trivial warnings

This commit is contained in:
Johann Dreo 2024-08-23 17:59:49 +02:00
commit 84148824e0
83 changed files with 218 additions and 196 deletions

View file

@ -54,7 +54,11 @@ public:
* @param _maxFullEval number maximum of iterations
* @param _restartCounter if true the counter of number of evaluations restarts to "zero" at initialization, if false, the number is cumulative
*/
moFullEvalContinuator(eoEvalFuncCounter<EOT> & _eval, unsigned int _maxFullEval, bool _restartCounter = true): eval(_eval), maxFullEval(_maxFullEval), restartCounter(_restartCounter) {
moFullEvalContinuator(eoEvalFuncCounter<EOT> & _eval, unsigned int _maxFullEval, bool _restartCounter = true):
eval(_eval),
restartCounter(_restartCounter),
maxFullEval(_maxFullEval)
{
nbEval_start = eval.value();
}

View file

@ -167,7 +167,7 @@ public :
if (nb > 1) {
sd = 0;
for(int i = 0; i < nb; i++)
for(unsigned i = 0; i < nb; i++)
sd += (neighborFitness[i] - mean) * (neighborFitness[i] - mean) ;
sd = sqrt( sd / (nb - 1.0) ); // becareful: could be infinite when large values
//sd = sqrt( (sd - nb * mean * mean) / (nb - 1.0) ); // becareful: could be negative due to approximation of large values

View file

@ -62,7 +62,7 @@ public :
* Set the first and the third quartile of fitness in the neighborhood
* @param _sol the first solution
*/
virtual void init(EOT & _sol) {
virtual void init(EOT & /*_sol*/) {
value().first = nhStat.getQ1();
value().second = nhStat.getQ3();
}
@ -71,7 +71,7 @@ public :
* Set the first and the third quartile fitness in the neighborhood
* @param _sol the corresponding solution
*/
virtual void operator()(EOT & _sol) {
virtual void operator()(EOT & /*_sol*/) {
value().first = nhStat.getQ1();
value().second = nhStat.getQ3();
}