summaryrefslogtreecommitdiff
path: root/src/theory/uf/theory_uf.cpp
diff options
context:
space:
mode:
authorTim King <taking@cs.nyu.edu>2017-10-25 14:28:07 -0700
committerAina Niemetz <aina.niemetz@gmail.com>2017-10-25 14:28:07 -0700
commit0e3f99d90a5fcafd04b04adf0d3e7e71ccfa65b0 (patch)
treed0a60841c95046ab9b19923d393f663805e962da /src/theory/uf/theory_uf.cpp
parentc49ef48588c708bfef3c7a0f9db8219415301a94 (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.cpp7
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;
generated by cgit on debian on lair
contact matthew@masot.net with questions or feedback