From 0aed7731210d0eb41c0ea767edb8067130cf6252 Mon Sep 17 00:00:00 2001 From: Frank Busse Date: Wed, 11 Sep 2019 21:27:11 +0100 Subject: refactor PTree: use unique_ptr --- lib/Core/Searcher.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'lib/Core/Searcher.cpp') 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<left : n->right; + n = (flips&(1<left.get() : n->right.get(); } } -- cgit 1.4.1