diff options
author | Tim King <taking@cs.nyu.edu> | 2017-10-25 14:28:07 -0700 |
---|---|---|
committer | Aina Niemetz <aina.niemetz@gmail.com> | 2017-10-25 14:28:07 -0700 |
commit | 0e3f99d90a5fcafd04b04adf0d3e7e71ccfa65b0 (patch) | |
tree | d0a60841c95046ab9b19923d393f663805e962da /src/theory/uf/theory_uf.cpp | |
parent | c49ef48588c708bfef3c7a0f9db8219415301a94 (diff) |
Switching EqProof to use shared_ptr everywhere. (#1217)
This clarifies the memory ownership of EqProofs.
Diffstat (limited to 'src/theory/uf/theory_uf.cpp')
-rw-r--r-- | src/theory/uf/theory_uf.cpp | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/theory/uf/theory_uf.cpp b/src/theory/uf/theory_uf.cpp index e8cc3b385..170621603 100644 --- a/src/theory/uf/theory_uf.cpp +++ b/src/theory/uf/theory_uf.cpp @@ -17,6 +17,8 @@ #include "theory/uf/theory_uf.h" +#include <memory> + #include "options/quantifiers_options.h" #include "options/smt_options.h" #include "options/uf_options.h" @@ -629,8 +631,9 @@ void TheoryUF::computeCareGraph() { }/* TheoryUF::computeCareGraph() */ void TheoryUF::conflict(TNode a, TNode b) { - eq::EqProof* pf = d_proofsEnabled ? new eq::EqProof() : NULL; - d_conflictNode = explain(a.eqNode(b),pf); + std::shared_ptr<eq::EqProof> pf = + d_proofsEnabled ? std::make_shared<eq::EqProof>() : nullptr; + d_conflictNode = explain(a.eqNode(b), pf.get()); ProofUF* puf = d_proofsEnabled ? new ProofUF( pf ) : NULL; d_out->conflict(d_conflictNode, puf); d_conflict = true; |