summaryrefslogtreecommitdiffstats
path: root/src/state.cc
diff options
context:
space:
mode:
authorNico Weber <nicolasweber@gmx.de>2017-06-22 19:59:00 (GMT)
committerGitHub <noreply@github.com>2017-06-22 19:59:00 (GMT)
commit7bbc708ff08f5660f4cff4b3e8c675bec428a1f2 (patch)
tree684fc7d5bc97e97a15bd8aab5c27c1680aa2ab4e /src/state.cc
parent61e347ed4e1c7681b6fd2888880ec0546907e9af (diff)
parent721d2a26b629d8556b73ce051f982967428d0738 (diff)
downloadNinja-7bbc708ff08f5660f4cff4b3e8c675bec428a1f2.zip
Ninja-7bbc708ff08f5660f4cff4b3e8c675bec428a1f2.tar.gz
Ninja-7bbc708ff08f5660f4cff4b3e8c675bec428a1f2.tar.bz2
Merge pull request #1111 from bradking/detect-cycles-early
Detect build graph cycles as early as possible
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() {