about summary refs log tree commit diff homepage
diff options
context:
space:
mode:
authorDaniel Schemmel <daniel@schemmel.net>2023-03-24 01:13:27 +0000
committerCristian Cadar <c.cadar@imperial.ac.uk>2023-04-21 13:07:31 +0100
commitae0fd16356a7e421e10ffc4e8701583f012b4516 (patch)
treeddb658eacbff918843062e4ebaa9ccd9c28bc246
parentb0f645687c36237a58a571b5b416717a871f2bf2 (diff)
downloadklee-ae0fd16356a7e421e10ffc4e8701583f012b4516.tar.gz
use unique_ptr in AssignmentValidatingSolver
-rw-r--r--lib/Solver/AssignmentValidatingSolver.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/Solver/AssignmentValidatingSolver.cpp b/lib/Solver/AssignmentValidatingSolver.cpp
index 54d6ec8c..f18f43a8 100644
--- a/lib/Solver/AssignmentValidatingSolver.cpp
+++ b/lib/Solver/AssignmentValidatingSolver.cpp
@@ -12,18 +12,18 @@
 #include "klee/Solver/Solver.h"
 #include "klee/Solver/SolverImpl.h"
 
+#include <memory>
 #include <vector>
 
 namespace klee {
 
 class AssignmentValidatingSolver : public SolverImpl {
 private:
-  Solver *solver;
+  std::unique_ptr<Solver> solver;
   void dumpAssignmentQuery(const Query &query, const Assignment &assignment);
 
 public:
   AssignmentValidatingSolver(Solver *_solver) : solver(_solver) {}
-  ~AssignmentValidatingSolver() { delete solver; }
 
   bool computeValidity(const Query &, Solver::Validity &result);
   bool computeTruth(const Query &, bool &isValid);