Prevent uninitialized value in nlopt optimizer

This commit is contained in:
tamasmeszaros 2022-11-08 08:29:42 +01:00
parent 834f428ba0
commit e62873ff13

View File

@ -68,7 +68,7 @@ template<class Method> class NLoptOpt {};
template<nlopt_algorithm alg> class NLoptOpt<NLoptAlg<alg>> { template<nlopt_algorithm alg> class NLoptOpt<NLoptAlg<alg>> {
protected: protected:
StopCriteria m_stopcr; StopCriteria m_stopcr;
OptDir m_dir; OptDir m_dir = OptDir::MIN;
template<class Fn> using TOptData = template<class Fn> using TOptData =
std::tuple<std::remove_reference_t<Fn>*, NLoptOpt*, nlopt_opt>; std::tuple<std::remove_reference_t<Fn>*, NLoptOpt*, nlopt_opt>;