summaryrefslogtreecommitdiffstats
path: root/src/graph.cc
diff options
context:
space:
mode:
authorNico Weber <nicolasweber@gmx.de>2014-12-07 22:49:49 (GMT)
committerNico Weber <nicolasweber@gmx.de>2014-12-07 22:52:44 (GMT)
commita9dac57ecad0b8ff4822c39446e9bf35afc0a615 (patch)
treefa43e84a6d032478b16f620f9e5b52c13c7fd6f8 /src/graph.cc
parent3d473e737c1140a55bd804b45df998be20a758cc (diff)
downloadNinja-a9dac57ecad0b8ff4822c39446e9bf35afc0a615.zip
Ninja-a9dac57ecad0b8ff4822c39446e9bf35afc0a615.tar.gz
Ninja-a9dac57ecad0b8ff4822c39446e9bf35afc0a615.tar.bz2
Rename a few iterators. No behavior change.
It confused me that the iterator iterating over `outputs_` was called `i` -- this always made me think of "input", not "iterator". Call iterators over edge outputs "o", iterators over edge inputs "i", iterators over node input edges "oe", and general iterators over edges "e".
Diffstat (limited to 'src/graph.cc')
-rw-r--r--src/graph.cc18
1 files changed, 9 insertions, 9 deletions
diff --git a/src/graph.cc b/src/graph.cc
index af7a22d..57f790c 100644
--- a/src/graph.cc
+++ b/src/graph.cc
@@ -112,11 +112,11 @@ bool DependencyScan::RecomputeDirty(Edge* edge, string* err) {
// Finally, visit each output to mark off that we've visited it, and update
// their dirty state if necessary.
- for (vector<Node*>::iterator i = edge->outputs_.begin();
- i != edge->outputs_.end(); ++i) {
- (*i)->StatIfNecessary(disk_interface_);
+ for (vector<Node*>::iterator o = edge->outputs_.begin();
+ o != edge->outputs_.end(); ++o) {
+ (*o)->StatIfNecessary(disk_interface_);
if (dirty)
- (*i)->MarkDirty();
+ (*o)->MarkDirty();
}
// If an edge is dirty, its outputs are normally not ready. (It's
@@ -132,11 +132,11 @@ bool DependencyScan::RecomputeDirty(Edge* edge, string* err) {
bool DependencyScan::RecomputeOutputsDirty(Edge* edge,
Node* most_recent_input) {
- string command = edge->EvaluateCommand(true);
- for (vector<Node*>::iterator i = edge->outputs_.begin();
- i != edge->outputs_.end(); ++i) {
- (*i)->StatIfNecessary(disk_interface_);
- if (RecomputeOutputDirty(edge, most_recent_input, command, *i))
+ string command = edge->EvaluateCommand(/*incl_rsp_file=*/true);
+ for (vector<Node*>::iterator o = edge->outputs_.begin();
+ o != edge->outputs_.end(); ++o) {
+ (*o)->StatIfNecessary(disk_interface_);
+ if (RecomputeOutputDirty(edge, most_recent_input, command, *o))
return true;
}
return false;