From ee5e1a36f6ea904d017bce5ee070430a531fbe2a Mon Sep 17 00:00:00 2001 From: nojhan Date: Wed, 22 Apr 2020 08:00:28 +0200 Subject: [PATCH] fix: doc and warnings --- eo/src/eoAlgoReset.h | 6 +++++- eo/src/es/make_genotype_real.h | 2 +- eo/src/ga/make_op.h | 2 +- eo/src/utils/eoParser.cpp | 2 +- eo/src/utils/eoRealBounds.cpp | 3 ++- 5 files changed, 10 insertions(+), 5 deletions(-) diff --git a/eo/src/eoAlgoReset.h b/eo/src/eoAlgoReset.h index 8ec80c108..fbe7dee94 100644 --- a/eo/src/eoAlgoReset.h +++ b/eo/src/eoAlgoReset.h @@ -29,7 +29,11 @@ Authors: #include "eoContinue.h" -/** @defgroup Reset Algorithms operating a reset of some sort (e.g. on the population). */ +/** @defgroup Reset + * + * Algorithms operating a reset of some sort. + * (e.g. on the population). + */ /** A semantic layer indicating that the derived operator operates a reset of some sort. * diff --git a/eo/src/es/make_genotype_real.h b/eo/src/es/make_genotype_real.h index 7f86e6720..2796d19a7 100644 --- a/eo/src/es/make_genotype_real.h +++ b/eo/src/es/make_genotype_real.h @@ -65,7 +65,7 @@ template eoEsChromInit & do_make_genotype(eoParser& _parser, eoState& _state, EOT) { // the fitness type - typedef typename EOT::Fitness FitT; + // typedef typename EOT::Fitness FitT; eoEsChromInit *init; // for eoReal, only thing needed is the size - but might have been created elswhere ... diff --git a/eo/src/ga/make_op.h b/eo/src/ga/make_op.h index afe5a5bc9..6b95b2cf8 100644 --- a/eo/src/ga/make_op.h +++ b/eo/src/ga/make_op.h @@ -69,7 +69,7 @@ */ template -eoGenOp & do_make_op(eoParser& _parser, eoState& _state, eoInit& _init) +eoGenOp & do_make_op(eoParser& _parser, eoState& _state, eoInit& /*_init*/) { // this is a temporary version, while Maarten codes the full tree-structured // general operator input diff --git a/eo/src/utils/eoParser.cpp b/eo/src/utils/eoParser.cpp index dc615bfa1..48194f740 100644 --- a/eo/src/utils/eoParser.cpp +++ b/eo/src/utils/eoParser.cpp @@ -77,7 +77,7 @@ eoParameterLoader::~eoParameterLoader() } eoParser::eoParser ( unsigned _argc, char **_argv , string _programDescription, - string _lFileParamName, char _shortHand) : + string /*_lFileParamName*/, char /*_shortHand*/) : programName(_argv[0]), programDescription( _programDescription), needHelpMessage( false ), diff --git a/eo/src/utils/eoRealBounds.cpp b/eo/src/utils/eoRealBounds.cpp index bb3ac11a5..c80c65509 100644 --- a/eo/src/utils/eoRealBounds.cpp +++ b/eo/src/utils/eoRealBounds.cpp @@ -242,7 +242,7 @@ eoRealBounds* eoGeneralRealBounds::getBoundsFromString(std::string _value) } // now create the embedded eoRealBounds object - eoRealBounds * locBound; + eoRealBounds * locBound = nullptr; if (minBounded && maxBounded) { if (maxBound <= minBound) @@ -255,5 +255,6 @@ eoRealBounds* eoGeneralRealBounds::getBoundsFromString(std::string _value) locBound = new eoRealAboveBound(maxBound); else if (minBounded && !maxBounded) locBound = new eoRealBelowBound(minBound); + assert(locBound != nullptr); return locBound; }