diff options
author | Frank Busse <bb0xfb@gmail.com> | 2019-09-11 21:27:11 +0100 |
---|---|---|
committer | MartinNowack <martin.nowack@gmail.com> | 2019-09-20 15:45:39 +0100 |
commit | 0aed7731210d0eb41c0ea767edb8067130cf6252 (patch) | |
tree | 61e6aa1241474e419568ac8b4d1a73c7c17c3f85 /lib/Core/Searcher.cpp | |
parent | d773e3f762affd7189d34fbd6d1e7e0e5af3f712 (diff) | |
download | klee-0aed7731210d0eb41c0ea767edb8067130cf6252.tar.gz |
refactor PTree: use unique_ptr
Diffstat (limited to 'lib/Core/Searcher.cpp')
-rw-r--r-- | lib/Core/Searcher.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/Core/Searcher.cpp b/lib/Core/Searcher.cpp index 8d35b7ef..0d5d61e2 100644 --- a/lib/Core/Searcher.cpp +++ b/lib/Core/Searcher.cpp @@ -264,19 +264,19 @@ RandomPathSearcher::~RandomPathSearcher() { ExecutionState &RandomPathSearcher::selectState() { unsigned flips=0, bits=0; - PTreeNode *n = executor.processTree->root; + PTreeNode *n = executor.processTree->root.get(); while (!n->state) { if (!n->left) { - n = n->right; + n = n->right.get(); } else if (!n->right) { - n = n->left; + n = n->left.get(); } else { if (bits==0) { flips = theRNG.getInt32(); bits = 32; } --bits; - n = (flips&(1<<bits)) ? n->left : n->right; + n = (flips&(1<<bits)) ? n->left.get() : n->right.get(); } } |