From e665b892db312e03ce9674b2a45aaca1b2dfd6ae Mon Sep 17 00:00:00 2001 From: Tim King Date: Sun, 24 Sep 2017 23:20:12 -0700 Subject: [PATCH] CID 1362907: Initializing d_smtEngine to nullptr. (#1134) --- src/smt/command.cpp | 4 ++-- src/smt/command.h | 12 +++++++----- 2 files changed, 9 insertions(+), 7 deletions(-) diff --git a/src/smt/command.cpp b/src/smt/command.cpp index 70302088b..c10b2c4ea 100644 --- a/src/smt/command.cpp +++ b/src/smt/command.cpp @@ -1258,8 +1258,8 @@ std::string GetInstantiationsCommand::getCommandName() const throw() { /* class GetSynthSolutionCommand */ -GetSynthSolutionCommand::GetSynthSolutionCommand() throw() { -} +GetSynthSolutionCommand::GetSynthSolutionCommand() throw() + : d_smtEngine(nullptr) {} void GetSynthSolutionCommand::invoke(SmtEngine* smtEngine) { try { diff --git a/src/smt/command.h b/src/smt/command.h index 2e0f4090e..2091028eb 100644 --- a/src/smt/command.h +++ b/src/smt/command.h @@ -648,17 +648,19 @@ public: };/* class GetInstantiationsCommand */ class CVC4_PUBLIC GetSynthSolutionCommand : public Command { -protected: - SmtEngine* d_smtEngine; -public: + public: GetSynthSolutionCommand() throw(); ~GetSynthSolutionCommand() throw() {} void invoke(SmtEngine* smtEngine); void printResult(std::ostream& out, uint32_t verbosity = 2) const; - Command* exportTo(ExprManager* exprManager, ExprManagerMapCollection& variableMap); + Command* exportTo(ExprManager* exprManager, + ExprManagerMapCollection& variableMap); Command* clone() const; std::string getCommandName() const throw(); -};/* class GetSynthSolutionCommand */ + + protected: + SmtEngine* d_smtEngine; +}; /* class GetSynthSolutionCommand */ class CVC4_PUBLIC GetQuantifierEliminationCommand : public Command { protected: -- 2.30.2