diff options
author | Andrew Reynolds <andrew.j.reynolds@gmail.com> | 2019-07-02 11:59:39 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-07-02 11:59:39 -0500 |
commit | 2c289524f23a2ec481224b2ea569397acbb5e39e (patch) | |
tree | b94c4e25d0f8c37cc2511811997f634566f36010 /src/theory/uf/theory_uf.cpp | |
parent | 1c5a8e7bee22e9b154a5ac65c52cc04d3d2ba3c0 (diff) |
Use unique_ptr for UF modules (#3080)
Diffstat (limited to 'src/theory/uf/theory_uf.cpp')
-rw-r--r-- | src/theory/uf/theory_uf.cpp | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/src/theory/uf/theory_uf.cpp b/src/theory/uf/theory_uf.cpp index 393d9f640..7ea3f8370 100644 --- a/src/theory/uf/theory_uf.cpp +++ b/src/theory/uf/theory_uf.cpp @@ -50,7 +50,8 @@ TheoryUF::TheoryUF(context::Context* c, d_notify(*this), /* The strong theory solver can be notified by EqualityEngine::init(), * so make sure it's initialized first. */ - d_thss(NULL), + d_thss(nullptr), + d_ho(nullptr), d_equalityEngine(d_notify, c, instanceName + "theory::uf::ee", true), d_conflict(c, false), d_functionsTerms(c), @@ -63,7 +64,6 @@ TheoryUF::TheoryUF(context::Context* c, } TheoryUF::~TheoryUF() { - delete d_thss; } void TheoryUF::setMasterEqualityEngine(eq::EqualityEngine* eq) { @@ -81,12 +81,13 @@ void TheoryUF::finishInit() { if (getLogicInfo().isTheoryEnabled(THEORY_UF) && options::finiteModelFind() && options::ufssMode() != UF_SS_NONE) { - d_thss = new StrongSolverTheoryUF(getSatContext(), getUserContext(), *d_out, this); + d_thss.reset(new StrongSolverTheoryUF( + getSatContext(), getUserContext(), *d_out, this)); } if (options::ufHo()) { d_equalityEngine.addFunctionKind(kind::HO_APPLY); - d_ho = new HoExtension(*this, getSatContext(), getUserContext()); + d_ho.reset(new HoExtension(*this, getSatContext(), getUserContext())); } } |