several fix of minor warnings

This commit is contained in:
Johann Dreo 2020-03-25 14:45:11 +01:00
commit 0332920d63
14 changed files with 22 additions and 20 deletions

View file

@ -64,7 +64,7 @@ public:
_setter(setter)
{}
virtual D operator()( eoPop<EOType>& pop )
virtual D operator()( eoPop<EOType>& )
{
_setter( _getter() );
return this->_distrib;

View file

@ -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 );
}

View file

@ -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;
};

View file

@ -74,9 +74,9 @@ public:
const std::string suffix = ""
) :
_cmd(cmd),
_suffix(suffix),
_infix(infix),
_prefix(prefix),
_infix(infix),
_suffix(suffix),
_last_call("")
{}

View file

@ -120,7 +120,7 @@ protected:
protected:
class DummyEval : public eoEvalFunc<EOT>
{
void operator()(EOT& sol) {/*empty*/}
void operator()(EOT&) {/*empty*/}
};
DummyEval _dummy_eval;
eoEvalFunc<EOT>& _func;

View file

@ -142,7 +142,7 @@ template<class EOT> class eoEvalKeepBest : public eoEvalFunc<EOT>, public eoValu
class DummyEval : public eoEvalFunc<EOT>
{
void operator()(EOT& sol) {/*empty*/}
void operator()(EOT&) {/*empty*/}
};
protected :

View file

@ -71,7 +71,7 @@ public:
}
/** Returns false when the signal has been typed in reached */
virtual bool operator() ( const eoPop<EOT>& _vEO )
virtual bool operator() ( const eoPop<EOT>& )
{
if (call_func)
{

View file

@ -41,7 +41,7 @@ public:
eoSecondsElapsedContinue(int nSeconds) : start(time(0)), seconds(nSeconds) {}
virtual bool operator() ( const eoPop<EOT>& _vEO ) {
virtual bool operator() ( const eoPop<EOT>& ) {
time_t now = time(0);
time_t diff = now - start;

View file

@ -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<POT>& _pop)
virtual POT & globalBest(const eoPop<POT>&)
{
return neighborhood.best();
}

View file

@ -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;
};

View file

@ -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<EOT>& _pop)
const EOT& operator()(const eoPop<EOT>& )
{
return select(actualPop);
}

View file

@ -93,7 +93,7 @@ void run_ea(eoAlgo<eoBit<eoMinimizingFitness> >& _ga, eoPop<eoBit<eoMinimizingFi
// end of parameter input (+ .status + help)
// that one is not templatized
// Because of that, the source is in src/utils dir
void make_help(eoParser & _parser, bool exit_after = true);
void make_help(eoParser & _parser, bool exit_after);
/** @} */
#endif

View file

@ -134,7 +134,7 @@ public:
/** just to be sure the add method is not called further
*/
virtual void add(const eoParam& _param)
virtual void add(const eoParam& )
{ throw std::runtime_error("eoFDCFileSnapshot::add(). Trying to add stats to an eoFDCFileSnapshot"); }
private:

View file

@ -72,6 +72,8 @@ public:
return *this;
}
using eoMonitor::add;
void add(eoMonitor& mon) { monitors.push_back(&mon); }
virtual std::string className(void) const { return "eoTimedMonitor"; }