diff options
Diffstat (limited to 'src/expr/node.h')
-rw-r--r-- | src/expr/node.h | 34 |
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; |