summaryrefslogtreecommitdiff
path: root/src/theory/substitutions.cpp
diff options
context:
space:
mode:
authorMathias Preiner <mathias.preiner@gmail.com>2020-03-05 11:42:54 -0800
committerGitHub <noreply@github.com>2020-03-05 11:42:54 -0800
commit04039407e6308070c148de0d5e93640ec1b0a341 (patch)
treeb66f63d49df0713b1ca2a440bec89f1d60af32a4 /src/theory/substitutions.cpp
parent18fe192c29a9a2c37d1925730af01e906b9888c5 (diff)
Enable -Wshadow and fix warnings. (#3909)
Fixes all -Wshadow warnings and enables the -Wshadow compile flag globally. Co-authored-by: Clark Barrett <barrett@cs.stanford.edu> Co-authored-by: Andres Noetzli <andres.noetzli@gmail.com> Co-authored-by: Aina Niemetz <aina.niemetz@gmail.com> Co-authored-by: Alex Ozdemir <aozdemir@hmc.edu> Co-authored-by: makaimann <makaim@stanford.edu> Co-authored-by: yoni206 <yoni206@users.noreply.github.com> Co-authored-by: Andrew Reynolds <andrew.j.reynolds@gmail.com> Co-authored-by: AleksandarZeljic <zeljic@stanford.edu> Co-authored-by: Caleb Donovick <cdonovick@users.noreply.github.com> Co-authored-by: Amalee <amaleewilson@gmail.com> Co-authored-by: Scott Kovach <dskovach@gmail.com> Co-authored-by: ntsis <nekuna@gmail.com>
Diffstat (limited to 'src/theory/substitutions.cpp')
-rw-r--r--src/theory/substitutions.cpp20
1 files changed, 12 insertions, 8 deletions
diff --git a/src/theory/substitutions.cpp b/src/theory/substitutions.cpp
index 333f09d2d..7728456a7 100644
--- a/src/theory/substitutions.cpp
+++ b/src/theory/substitutions.cpp
@@ -24,10 +24,11 @@ namespace CVC4 {
namespace theory {
struct substitution_stack_element {
- TNode node;
- bool children_added;
- substitution_stack_element(TNode node)
- : node(node), children_added(false) {}
+ TNode d_node;
+ bool d_children_added;
+ substitution_stack_element(TNode node) : d_node(node), d_children_added(false)
+ {
+ }
};/* struct substitution_stack_element */
Node SubstitutionMap::internalSubstitute(TNode t, NodeCache& cache) {
@@ -46,7 +47,7 @@ Node SubstitutionMap::internalSubstitute(TNode t, NodeCache& cache) {
{
// The current node we are processing
substitution_stack_element& stackHead = toVisit.back();
- TNode current = stackHead.node;
+ TNode current = stackHead.d_node;
Debug("substitution::internal") << "SubstitutionMap::internalSubstitute(" << t << "): processing " << current << endl;
@@ -77,7 +78,8 @@ Node SubstitutionMap::internalSubstitute(TNode t, NodeCache& cache) {
}
// Not yet substituted, so process
- if (stackHead.children_added) {
+ if (stackHead.d_children_added)
+ {
// Children have been processed, so substitute
NodeBuilder<> builder(current.getKind());
if (current.getMetaKind() == kind::metakind::PARAMETERIZED) {
@@ -109,10 +111,12 @@ Node SubstitutionMap::internalSubstitute(TNode t, NodeCache& cache) {
Debug("substitution::internal") << "SubstitutionMap::internalSubstitute(" << t << "): setting " << current << " -> " << result << endl;
cache[current] = result;
toVisit.pop_back();
- } else {
+ }
+ else
+ {
// Mark that we have added the children if any
if (current.getNumChildren() > 0 || current.getMetaKind() == kind::metakind::PARAMETERIZED) {
- stackHead.children_added = true;
+ stackHead.d_children_added = true;
// We need to add the operator, if any
if(current.getMetaKind() == kind::metakind::PARAMETERIZED) {
TNode opNode = current.getOperator();
generated by cgit on debian on lair
contact matthew@masot.net with questions or feedback