Something went wrong with past commit's. So, again
- added the virtual destructors of all classes, to suppress g++ annoying warnings when using -Wall option
This commit is contained in:
parent
9c75e1c408
commit
4b38c62c95
1 changed files with 5 additions and 2 deletions
|
|
@ -36,7 +36,7 @@ struct eoException
|
||||||
{
|
{
|
||||||
eoException() {}
|
eoException() {}
|
||||||
eoException(const eoObject& caller) : who_caught_it(caller.className()) {}
|
eoException(const eoObject& caller) : who_caught_it(caller.className()) {}
|
||||||
|
virtual ~eoException(){} // otherwise compiler complains
|
||||||
std::string who(void) const { return who_caught_it; }
|
std::string who(void) const { return who_caught_it; }
|
||||||
virtual std::string what(void) const{ return "";}
|
virtual std::string what(void) const{ return "";}
|
||||||
|
|
||||||
|
|
@ -48,6 +48,7 @@ struct eoFitnessException : public eoException
|
||||||
{
|
{
|
||||||
eoFitnessException() : eoException() {}
|
eoFitnessException() : eoException() {}
|
||||||
eoFitnessException(const eoObject& caller) : eoException(caller) {}
|
eoFitnessException(const eoObject& caller) : eoException(caller) {}
|
||||||
|
virtual ~eoFitnessException(){} // otherwise compiler complains
|
||||||
};
|
};
|
||||||
|
|
||||||
struct eoNegativeFitnessException : public eoFitnessException
|
struct eoNegativeFitnessException : public eoFitnessException
|
||||||
|
|
@ -55,6 +56,7 @@ struct eoNegativeFitnessException : public eoFitnessException
|
||||||
eoNegativeFitnessException() : eoFitnessException() {}
|
eoNegativeFitnessException() : eoFitnessException() {}
|
||||||
eoNegativeFitnessException(const eoObject& caller) : eoFitnessException(caller) {}
|
eoNegativeFitnessException(const eoObject& caller) : eoFitnessException(caller) {}
|
||||||
|
|
||||||
|
virtual ~eoNegativeFitnessException(){} // otherwise compiler complains
|
||||||
std::string what(void) const { return "negative fitness encountered"; }
|
std::string what(void) const { return "negative fitness encountered"; }
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
@ -62,6 +64,7 @@ struct eoMinimizingFitnessException : public eoFitnessException
|
||||||
{
|
{
|
||||||
eoMinimizingFitnessException() : eoFitnessException() {}
|
eoMinimizingFitnessException() : eoFitnessException() {}
|
||||||
eoMinimizingFitnessException(const eoObject& caller) : eoFitnessException(caller) {}
|
eoMinimizingFitnessException(const eoObject& caller) : eoFitnessException(caller) {}
|
||||||
|
virtual ~eoMinimizingFitnessException(){} // otherwise compiler complains
|
||||||
|
|
||||||
std::string what(void) const { return "smaller fitness is better fitness, which is quite inappropriate here"; }
|
std::string what(void) const { return "smaller fitness is better fitness, which is quite inappropriate here"; }
|
||||||
};
|
};
|
||||||
|
|
|
||||||
Reference in a new issue