summaryrefslogtreecommitdiffstats
path: root/src/state.cc
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2015-11-12 16:24:50 (GMT)
committerBrad King <brad.king@kitware.com>2017-06-19 15:08:26 (GMT)
commita8b5cdc4e9034f8823ee0cfa94ea49d7795698ab (patch)
treef7f9cdc4b8d9660b9b58a5964c61dddbfc0e8492 /src/state.cc
parentafe3beb980a4780caecc12d3fc919feb3f9cce42 (diff)
downloadNinja-a8b5cdc4e9034f8823ee0cfa94ea49d7795698ab.zip
Ninja-a8b5cdc4e9034f8823ee0cfa94ea49d7795698ab.tar.gz
Ninja-a8b5cdc4e9034f8823ee0cfa94ea49d7795698ab.tar.bz2
Add infrastructure for efficient walks through the `Edge` graph
Store a mark in each `Edge` to be updated as it is encountered by a walk.
Diffstat (limited to 'src/state.cc')
-rw-r--r--src/state.cc4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/state.cc b/src/state.cc
index 6079229..9b3c7e1 100644
--- a/src/state.cc
+++ b/src/state.cc
@@ -184,8 +184,10 @@ vector<Node*> State::DefaultNodes(string* err) const {
void State::Reset() {
for (Paths::iterator i = paths_.begin(); i != paths_.end(); ++i)
i->second->ResetState();
- for (vector<Edge*>::iterator e = edges_.begin(); e != edges_.end(); ++e)
+ for (vector<Edge*>::iterator e = edges_.begin(); e != edges_.end(); ++e) {
(*e)->outputs_ready_ = false;
+ (*e)->mark_ = Edge::VisitNone;
+ }
}
void State::Dump() {