summaryrefslogtreecommitdiff
path: root/src/expr/node.h
diff options
context:
space:
mode:
authorAndrew Reynolds <andrew.j.reynolds@gmail.com>2020-02-26 19:11:31 -0600
committerGitHub <noreply@github.com>2020-02-26 19:11:31 -0600
commitd41d2a817f884e0f6c8d5cb3b87b4298bc1b56f5 (patch)
tree5cfe4336c5aa40cac613238a2625b1fb4aa55d31 /src/expr/node.h
parent4b7de240edeee362a0b9ca440c22a8b0744cf34b (diff)
Initial work towards -Wshadow (#3817)
Diffstat (limited to 'src/expr/node.h')
-rw-r--r--src/expr/node.h34
1 files changed, 15 insertions, 19 deletions
diff --git a/src/expr/node.h b/src/expr/node.h
index d02cbcefd..616e256ab 100644
--- a/src/expr/node.h
+++ b/src/expr/node.h
@@ -1363,14 +1363,15 @@ NodeTemplate<ref_count>::substitute(TNode node, TNode replacement,
nb << getOperator().substitute(node, replacement, cache);
}
}
- for(const_iterator i = begin(),
- iend = end();
- i != iend;
- ++i) {
- if(*i == node) {
+ for (const_iterator it = begin(), iend = end(); it != iend; ++it)
+ {
+ if (*it == node)
+ {
nb << replacement;
- } else {
- nb << (*i).substitute(node, replacement, cache);
+ }
+ else
+ {
+ nb << (*it).substitute(node, replacement, cache);
}
}
@@ -1429,13 +1430,10 @@ NodeTemplate<ref_count>::substitute(Iterator1 nodesBegin,
replacementsBegin, replacementsEnd,
cache);
}
- for(const_iterator i = begin(),
- iend = end();
- i != iend;
- ++i) {
- nb << (*i).substitute(nodesBegin, nodesEnd,
- replacementsBegin, replacementsEnd,
- cache);
+ for (const_iterator it = begin(), iend = end(); it != iend; ++it)
+ {
+ nb << (*it).substitute(
+ nodesBegin, nodesEnd, replacementsBegin, replacementsEnd, cache);
}
Node n = nb;
cache[*this] = n;
@@ -1480,11 +1478,9 @@ NodeTemplate<ref_count>::substitute(Iterator substitutionsBegin,
// push the operator
nb << getOperator().substitute(substitutionsBegin, substitutionsEnd, cache);
}
- for(const_iterator i = begin(),
- iend = end();
- i != iend;
- ++i) {
- nb << (*i).substitute(substitutionsBegin, substitutionsEnd, cache);
+ for (const_iterator it = begin(), iend = end(); it != iend; ++it)
+ {
+ nb << (*it).substitute(substitutionsBegin, substitutionsEnd, cache);
}
Node n = nb;
cache[*this] = n;
generated by cgit on debian on lair
contact matthew@masot.net with questions or feedback