summaryrefslogtreecommitdiffstats
path: root/src/build.cc
diff options
context:
space:
mode:
authorScott Graham <scottmg@chromium.org>2015-04-27 18:12:43 (GMT)
committerScott Graham <scottmg@chromium.org>2015-04-27 18:12:45 (GMT)
commitbf2f4b7356c8ea918718651bae586149ab97ebee (patch)
tree10fd1af3827d3ac80803af72829af24a492a0f88 /src/build.cc
parent4c4887d26011225deaa20b6752193be0293624ab (diff)
downloadNinja-bf2f4b7356c8ea918718651bae586149ab97ebee.zip
Ninja-bf2f4b7356c8ea918718651bae586149ab97ebee.tar.gz
Ninja-bf2f4b7356c8ea918718651bae586149ab97ebee.tar.bz2
simplify & inline
Diffstat (limited to 'src/build.cc')
-rw-r--r--src/build.cc19
1 files changed, 7 insertions, 12 deletions
diff --git a/src/build.cc b/src/build.cc
index e266b5c..cdb8e0a 100644
--- a/src/build.cc
+++ b/src/build.cc
@@ -374,24 +374,19 @@ void Plan::ScheduleWork(Edge* edge) {
}
}
-void Plan::ResumeDelayedJobs(Edge* edge) {
- edge->pool()->EdgeFinished(*edge);
- edge->pool()->RetrieveReadyEdges(&ready_);
-}
-
-void Plan::EdgeFinished(Edge* edge, bool directly_wanted) {
+void Plan::EdgeFinished(Edge* edge) {
map<Edge*, bool>::iterator e = want_.find(edge);
assert(e != want_.end());
- if (e->second)
+ bool directly_wanted = e->second;
+ if (directly_wanted)
--wanted_edges_;
want_.erase(e);
edge->outputs_ready_ = true;
- // See if this job frees up any delayed jobs
+ // See if this job frees up any delayed jobs.
if (directly_wanted)
- ResumeDelayedJobs(edge);
- else
- edge->pool()->RetrieveReadyEdges(&ready_);
+ edge->pool()->EdgeFinished(*edge);
+ edge->pool()->RetrieveReadyEdges(&ready_);
// Check off any nodes we were waiting for with this edge.
for (vector<Node*>::iterator o = edge->outputs_.begin();
@@ -415,7 +410,7 @@ void Plan::NodeFinished(Node* node) {
} else {
// We do not need to build this edge, but we might need to build one of
// its dependents.
- EdgeFinished(*oe, want_e->second);
+ EdgeFinished(*oe);
}
}
}