about summary refs log tree commit diff homepage
path: root/lib/Core/Searcher.cpp
diff options
context:
space:
mode:
authorTimotej Kapus <tk1713@ic.ac.uk>2019-10-24 15:38:08 +0100
committerCristian Cadar <c.cadar@imperial.ac.uk>2020-06-29 22:24:53 +0100
commit9c50be98c0b291bdde94cf870316569f8eab5917 (patch)
tree5b3d78fae6f3490fd88d4f478fd38ab032f975f1 /lib/Core/Searcher.cpp
parent67ea19efc36bbf8885f32e85d11f920342a7949c (diff)
downloadklee-9c50be98c0b291bdde94cf870316569f8eab5917.tar.gz
Revert "refactor PTree: use unique_ptr"
This reverts commit 0aed7731210d0eb41c0ea767edb8067130cf6252.
Diffstat (limited to 'lib/Core/Searcher.cpp')
-rw-r--r--lib/Core/Searcher.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/Core/Searcher.cpp b/lib/Core/Searcher.cpp
index a9c7d318..0a1e6152 100644
--- a/lib/Core/Searcher.cpp
+++ b/lib/Core/Searcher.cpp
@@ -269,19 +269,19 @@ RandomPathSearcher::~RandomPathSearcher() {
 
 ExecutionState &RandomPathSearcher::selectState() {
   unsigned flips=0, bits=0;
-  PTreeNode *n = executor.processTree->root.get();
+  PTreeNode *n = executor.processTree->root;
   while (!n->state) {
     if (!n->left) {
-      n = n->right.get();
+      n = n->right;
     } else if (!n->right) {
-      n = n->left.get();
+      n = n->left;
     } else {
       if (bits==0) {
         flips = theRNG.getInt32();
         bits = 32;
       }
       --bits;
-      n = (flips&(1<<bits)) ? n->left.get() : n->right.get();
+      n = (flips&(1<<bits)) ? n->left : n->right;
     }
   }