diff options
Diffstat (limited to 'src/smt/command.cpp')
-rw-r--r-- | src/smt/command.cpp | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/src/smt/command.cpp b/src/smt/command.cpp index 3df2c4f41..aea6365b7 100644 --- a/src/smt/command.cpp +++ b/src/smt/command.cpp @@ -1210,12 +1210,12 @@ std::string GetModelCommand::getCommandName() const throw() { /* class GetProofCommand */ GetProofCommand::GetProofCommand() throw() - : d_result(nullptr), d_smtEngine(nullptr) {} + : d_smtEngine(nullptr), d_result(nullptr) {} void GetProofCommand::invoke(SmtEngine* smtEngine) { try { d_smtEngine = smtEngine; - d_result = smtEngine->getProof(); + d_result = &smtEngine->getProof(); d_commandStatus = CommandSuccess::instance(); } catch (RecoverableModalException& e) { d_commandStatus = new CommandRecoverableFailure(e.what()); @@ -1226,10 +1226,7 @@ void GetProofCommand::invoke(SmtEngine* smtEngine) { } } -Proof* GetProofCommand::getResult() const throw() { - return d_result; -} - +const Proof& GetProofCommand::getResult() const throw() { return *d_result; } void GetProofCommand::printResult(std::ostream& out, uint32_t verbosity) const { if(! ok()) { this->Command::printResult(out, verbosity); |