From 0332920d633fe2ddba834df019a1757083a152c8 Mon Sep 17 00:00:00 2001 From: nojhan Date: Wed, 25 Mar 2020 14:45:11 +0100 Subject: [PATCH] several fix of minor warnings --- edo/src/edoEstimatorAdaptiveEdit.h | 2 +- edo/src/edoSamplerBinomialMulti.h | 4 ++-- eo/src/eoEasyPSO.h | 4 ++-- eo/src/eoEvalCmd.h | 4 ++-- eo/src/eoEvalDump.h | 2 +- eo/src/eoEvalKeepBest.h | 2 +- eo/src/eoSIGContinue.h | 2 +- eo/src/eoSecondsElapsedContinue.h | 2 +- eo/src/eoStarTopology.h | 6 +++--- eo/src/eoSyncEasyPSO.h | 4 ++-- eo/src/eoTruncatedSelectOne.h | 4 ++-- eo/src/ga/make_ga.h | 2 +- eo/src/utils/eoFDCStat.h | 2 +- eo/src/utils/eoTimedMonitor.h | 2 ++ 14 files changed, 22 insertions(+), 20 deletions(-) diff --git a/edo/src/edoEstimatorAdaptiveEdit.h b/edo/src/edoEstimatorAdaptiveEdit.h index dbf0d920b..cefd4187c 100644 --- a/edo/src/edoEstimatorAdaptiveEdit.h +++ b/edo/src/edoEstimatorAdaptiveEdit.h @@ -64,7 +64,7 @@ public: _setter(setter) {} - virtual D operator()( eoPop& pop ) + virtual D operator()( eoPop& ) { _setter( _getter() ); return this->_distrib; diff --git a/edo/src/edoSamplerBinomialMulti.h b/edo/src/edoSamplerBinomialMulti.h index 732cdbed5..dda1a4eb1 100644 --- a/edo/src/edoSamplerBinomialMulti.h +++ b/edo/src/edoSamplerBinomialMulti.h @@ -51,13 +51,13 @@ public: * The default implementation is to push back a true boolean. * If you have a more complex data structure, you can just overload this. */ - virtual void make_true( AtomType & atom, unsigned int i, unsigned int j ) + virtual void make_true( AtomType & atom, unsigned int, unsigned int ) { atom.push_back( 1 ); } /** @see make_true */ - virtual void make_false( AtomType & atom, unsigned int i, unsigned int j ) + virtual void make_false( AtomType & atom, unsigned int, unsigned int ) { atom.push_back( 0 ); } diff --git a/eo/src/eoEasyPSO.h b/eo/src/eoEasyPSO.h index 3e9997e3a..f1e00bf2a 100644 --- a/eo/src/eoEasyPSO.h +++ b/eo/src/eoEasyPSO.h @@ -176,7 +176,7 @@ protected: { public: eoDummyFlight () {} - void operator () (POT & _po) {} + void operator () (POT &) {} }dummyFlight; // if the initializer does not need to be used, use the dummy one instead @@ -184,7 +184,7 @@ protected: { public: eoDummyInitializer () {} - void operator () (POT & _po) {} + void operator () (POT &) {} }dummyInit; }; diff --git a/eo/src/eoEvalCmd.h b/eo/src/eoEvalCmd.h index e34dd3eee..0f2633a98 100644 --- a/eo/src/eoEvalCmd.h +++ b/eo/src/eoEvalCmd.h @@ -74,9 +74,9 @@ public: const std::string suffix = "" ) : _cmd(cmd), - _suffix(suffix), - _infix(infix), _prefix(prefix), + _infix(infix), + _suffix(suffix), _last_call("") {} diff --git a/eo/src/eoEvalDump.h b/eo/src/eoEvalDump.h index a5ad8e3fb..2f26ee327 100644 --- a/eo/src/eoEvalDump.h +++ b/eo/src/eoEvalDump.h @@ -120,7 +120,7 @@ protected: protected: class DummyEval : public eoEvalFunc { - void operator()(EOT& sol) {/*empty*/} + void operator()(EOT&) {/*empty*/} }; DummyEval _dummy_eval; eoEvalFunc& _func; diff --git a/eo/src/eoEvalKeepBest.h b/eo/src/eoEvalKeepBest.h index 133e01b87..86dd50456 100644 --- a/eo/src/eoEvalKeepBest.h +++ b/eo/src/eoEvalKeepBest.h @@ -142,7 +142,7 @@ template class eoEvalKeepBest : public eoEvalFunc, public eoValu class DummyEval : public eoEvalFunc { - void operator()(EOT& sol) {/*empty*/} + void operator()(EOT&) {/*empty*/} }; protected : diff --git a/eo/src/eoSIGContinue.h b/eo/src/eoSIGContinue.h index 32e7c1857..a0afae040 100644 --- a/eo/src/eoSIGContinue.h +++ b/eo/src/eoSIGContinue.h @@ -71,7 +71,7 @@ public: } /** Returns false when the signal has been typed in reached */ - virtual bool operator() ( const eoPop& _vEO ) + virtual bool operator() ( const eoPop& ) { if (call_func) { diff --git a/eo/src/eoSecondsElapsedContinue.h b/eo/src/eoSecondsElapsedContinue.h index a580b7f42..a258819fa 100644 --- a/eo/src/eoSecondsElapsedContinue.h +++ b/eo/src/eoSecondsElapsedContinue.h @@ -41,7 +41,7 @@ public: eoSecondsElapsedContinue(int nSeconds) : start(time(0)), seconds(nSeconds) {} - virtual bool operator() ( const eoPop& _vEO ) { + virtual bool operator() ( const eoPop& ) { time_t now = time(0); time_t diff = now - start; diff --git a/eo/src/eoStarTopology.h b/eo/src/eoStarTopology.h index a345c8bc3..6083dbba8 100644 --- a/eo/src/eoStarTopology.h +++ b/eo/src/eoStarTopology.h @@ -86,7 +86,7 @@ public: * @param _po - The particle to update * @param _indice - The indice of the given particle in the population */ - void updateNeighborhood(POT & _po,unsigned _indice) + void updateNeighborhood(POT & _po, unsigned) { // update the best fitness of the particle if (_po.fitness() > _po.best()) @@ -108,13 +108,13 @@ public: * @param _indice - The indice of a particle in the population * @return POT & - The best particle in the neighborhood of the particle whose indice is _indice */ - POT & best (unsigned _indice) {return (neighborhood.best());} + POT & best (unsigned) {return (neighborhood.best());} /* * Return the global best of the topology */ - virtual POT & globalBest(const eoPop& _pop) + virtual POT & globalBest(const eoPop&) { return neighborhood.best(); } diff --git a/eo/src/eoSyncEasyPSO.h b/eo/src/eoSyncEasyPSO.h index 0fc7a2492..64cf64724 100644 --- a/eo/src/eoSyncEasyPSO.h +++ b/eo/src/eoSyncEasyPSO.h @@ -241,7 +241,7 @@ protected: { public: eoDummyFlight () {} - void operator () (POT & /*_po*/) {} + void operator () (POT &) {} }dummyFlight; // if the initializer does not need to be used, use the dummy one instead @@ -249,7 +249,7 @@ protected: { public: eoDummyInitializer () {} - void operator () (POT & _po) {} + void operator () (POT &) {} }dummyInit; }; diff --git a/eo/src/eoTruncatedSelectOne.h b/eo/src/eoTruncatedSelectOne.h index 431f7465a..5bda5600f 100644 --- a/eo/src/eoTruncatedSelectOne.h +++ b/eo/src/eoTruncatedSelectOne.h @@ -93,10 +93,10 @@ public: /** The implementation selects an individual from the fertile pop - @param _pop the source population + @param unused @return the selected guy */ - const EOT& operator()(const eoPop& _pop) + const EOT& operator()(const eoPop& ) { return select(actualPop); } diff --git a/eo/src/ga/make_ga.h b/eo/src/ga/make_ga.h index 660462477..9cec19ae4 100644 --- a/eo/src/ga/make_ga.h +++ b/eo/src/ga/make_ga.h @@ -93,7 +93,7 @@ void run_ea(eoAlgo >& _ga, eoPop