diff options
author | Evan Martin <martine@danga.com> | 2012-09-02 19:27:46 (GMT) |
---|---|---|
committer | Evan Martin <martine@danga.com> | 2012-09-02 19:27:46 (GMT) |
commit | 3220e626da48bc0fd69bee5a3dfae3b55bd0b761 (patch) | |
tree | a40cf4ad8e33205d13590fd781f88108882925e6 /src/build.cc | |
parent | fd91e0dc26d18209f7625730bb0e653f8321fff9 (diff) | |
download | Ninja-3220e626da48bc0fd69bee5a3dfae3b55bd0b761.zip Ninja-3220e626da48bc0fd69bee5a3dfae3b55bd0b761.tar.gz Ninja-3220e626da48bc0fd69bee5a3dfae3b55bd0b761.tar.bz2 |
remove a redundant arg to RecomputeOutputDirty
Diffstat (limited to 'src/build.cc')
-rw-r--r-- | src/build.cc | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/src/build.cc b/src/build.cc index 18bba9e..4102209 100644 --- a/src/build.cc +++ b/src/build.cc @@ -422,10 +422,11 @@ void Plan::CleanNode(DependencyScan* scan, Node* node) { end = (*ei)->inputs_.end() - (*ei)->order_only_deps_; if (find_if(begin, end, mem_fun(&Node::dirty)) == end) { // Recompute most_recent_input and command. - TimeStamp most_recent_input = 1; - for (vector<Node*>::iterator ni = begin; ni != end; ++ni) - if ((*ni)->mtime() > most_recent_input) - most_recent_input = (*ni)->mtime(); + Node* most_recent_input = NULL; + for (vector<Node*>::iterator ni = begin; ni != end; ++ni) { + if (!most_recent_input || (*ni)->mtime() > most_recent_input->mtime()) + most_recent_input = *ni; + } string command = (*ei)->EvaluateCommand(true); // Now, recompute the dirty state of each output. @@ -435,7 +436,7 @@ void Plan::CleanNode(DependencyScan* scan, Node* node) { if (!(*ni)->dirty()) continue; - if (scan->RecomputeOutputDirty(*ei, most_recent_input, NULL, + if (scan->RecomputeOutputDirty(*ei, most_recent_input, command, *ni)) { (*ni)->MarkDirty(); all_outputs_clean = false; |