CID 1362907: Initializing d_smtEngine to nullptr. (#1134)
authorTim King <taking@cs.nyu.edu>
Mon, 25 Sep 2017 06:20:12 +0000 (23:20 -0700)
committerGitHub <noreply@github.com>
Mon, 25 Sep 2017 06:20:12 +0000 (23:20 -0700)
src/smt/command.cpp
src/smt/command.h

index 70302088b6f645a94b8f6f3cef39fd91e7c0ef56..c10b2c4eaf7d6f84891744a62b704bd40b6a85d8 100644 (file)
@@ -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 {
index 2e0f4090e304e417a83f1855353cab1546ece0cf..2091028eb9a09b85eaef476b3cf91f4ebaf1ad2d 100644 (file)
@@ -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: