diff options
author | Daniel Schemmel <daniel@schemmel.net> | 2023-03-24 15:01:00 +0000 |
---|---|---|
committer | Cristian Cadar <c.cadar@imperial.ac.uk> | 2023-04-21 13:07:31 +0100 |
commit | dab8f985dbf0310a7338e15e85f9268649540293 (patch) | |
tree | ff3eafcb1598c6639be85a0caf7c59e1385c1ba6 /lib/Solver | |
parent | 421319a2cca7e57e5479113dadf13ea6115d37fd (diff) | |
download | klee-dab8f985dbf0310a7338e15e85f9268649540293.tar.gz |
use unique_ptr in IndependentSolver
Diffstat (limited to 'lib/Solver')
-rw-r--r-- | lib/Solver/IndependentSolver.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/Solver/IndependentSolver.cpp b/lib/Solver/IndependentSolver.cpp index 812aefb6..007bfdcb 100644 --- a/lib/Solver/IndependentSolver.cpp +++ b/lib/Solver/IndependentSolver.cpp @@ -21,7 +21,9 @@ #include <list> #include <map> +#include <memory> #include <ostream> +#include <utility> #include <vector> using namespace klee; @@ -388,12 +390,10 @@ void calculateArrayReferences(const IndependentElementSet & ie, class IndependentSolver : public SolverImpl { private: - Solver *solver; + std::unique_ptr<Solver> solver; public: - IndependentSolver(Solver *_solver) - : solver(_solver) {} - ~IndependentSolver() { delete solver; } + IndependentSolver(Solver *_solver) : solver(_solver) {} bool computeTruth(const Query&, bool &isValid); bool computeValidity(const Query&, Solver::Validity &result); |