summaryrefslogtreecommitdiff
path: root/src/smt_util/node_visitor.h
diff options
context:
space:
mode:
authorAndres Noetzli <andres.noetzli@gmail.com>2020-02-27 00:08:42 -0800
committerGitHub <noreply@github.com>2020-02-27 00:08:42 -0800
commitc2e7c568f5741215ac58cb7fd47952c52876fa0f (patch)
tree1cc745df05031b4d5665e8548f786f0ad1707605 /src/smt_util/node_visitor.h
parent6c687e2d76f16328d5a2d10ab32a582fb18e00f2 (diff)
parent87f3741db6ed41d3a776774bc1b60fd696585391 (diff)
Merge branch 'master' into fixWShadowfixWShadow
Diffstat (limited to 'src/smt_util/node_visitor.h')
-rw-r--r--src/smt_util/node_visitor.h24
1 files changed, 15 insertions, 9 deletions
diff --git a/src/smt_util/node_visitor.h b/src/smt_util/node_visitor.h
index 58070c0b2..47ed6eff8 100644
--- a/src/smt_util/node_visitor.h
+++ b/src/smt_util/node_visitor.h
@@ -59,13 +59,15 @@ public:
*/
struct stack_element {
/** The node to be visited */
- TNode node;
+ TNode d_node;
/** The parent of the node */
- TNode parent;
+ TNode d_parent;
/** Have the children been queued up for visitation */
- bool children_added;
+ bool d_childrenAdded;
stack_element(TNode node, TNode parent)
- : node(node), parent(parent), children_added(false) {}
+ : d_node(node), d_parent(parent), d_childrenAdded(false)
+ {
+ }
};/* struct preprocess_stack_element */
/**
@@ -84,20 +86,24 @@ public:
while (!toVisit.empty()) {
stack_element& stackHead = toVisit.back();
// The current node we are processing
- TNode current = stackHead.node;
- TNode parent = stackHead.parent;
+ TNode current = stackHead.d_node;
+ TNode parent = stackHead.d_parent;
if (visitor.alreadyVisited(current, parent)) {
// If already visited, we're done
toVisit.pop_back();
- } else if (stackHead.children_added) {
+ }
+ else if (stackHead.d_childrenAdded)
+ {
// Call the visitor
visitor.visit(current, parent);
// Done with this node, remove from the stack
toVisit.pop_back();
- } else {
+ }
+ else
+ {
// Mark that we have added the children
- stackHead.children_added = true;
+ stackHead.d_childrenAdded = true;
// We need to add the children
for(TNode::iterator child_it = current.begin(); child_it != current.end(); ++ child_it) {
TNode childNode = *child_it;
generated by cgit on debian on lair
contact matthew@masot.net with questions or feedback