diff options
Diffstat (limited to 'lib/Core/PTree.cpp')
-rw-r--r-- | lib/Core/PTree.cpp | 30 |
1 files changed, 6 insertions, 24 deletions
diff --git a/lib/Core/PTree.cpp b/lib/Core/PTree.cpp index 77698bb5..e3e38868 100644 --- a/lib/Core/PTree.cpp +++ b/lib/Core/PTree.cpp @@ -18,10 +18,7 @@ using namespace klee; /* *** */ -PTree::PTree(const data_type &_root) : root(new Node(0,_root)) { -} - -PTree::~PTree() {} +PTree::PTree(const data_type &root) : root(new Node(nullptr, root)) {} std::pair<PTreeNode*, PTreeNode*> PTree::split(Node *n, @@ -39,10 +36,10 @@ void PTree::remove(Node *n) { Node *p = n->parent; if (p) { if (n == p->left) { - p->left = 0; + p->left = nullptr; } else { assert(n == p->right); - p->right = 0; + p->right = nullptr; } } delete n; @@ -65,13 +62,7 @@ void PTree::dump(llvm::raw_ostream &os) { while (!stack.empty()) { PTree::Node *n = stack.back(); stack.pop_back(); - if (n->condition.isNull()) { - os << "\tn" << n << " [label=\"\""; - } else { - os << "\tn" << n << " [label=\""; - pp->print(n->condition); - os << "\",shape=diamond"; - } + os << "\tn" << n << " [shape=diamond"; if (n->data) os << ",fillcolor=green"; os << "];\n"; @@ -88,15 +79,6 @@ void PTree::dump(llvm::raw_ostream &os) { delete pp; } -PTreeNode::PTreeNode(PTreeNode *_parent, - ExecutionState *_data) - : parent(_parent), - left(0), - right(0), - data(_data), - condition(0) { -} - -PTreeNode::~PTreeNode() { -} +PTreeNode::PTreeNode(PTreeNode * parent, ExecutionState * data) + : parent{parent}, data{data} {} |