diff options
author | Evan Martin <martine@danga.com> | 2011-12-04 21:11:05 (GMT) |
---|---|---|
committer | Evan Martin <martine@danga.com> | 2011-12-04 21:11:05 (GMT) |
commit | 94b48447792a2908305c56db5e0f293df069e474 (patch) | |
tree | 4e12396d334d690c87768d0e27aba38f2b3675be /src/graph.cc | |
parent | f39ebbfa26105a8e0ae7a7cad0246d009b0d29d0 (diff) | |
download | Ninja-94b48447792a2908305c56db5e0f293df069e474.zip Ninja-94b48447792a2908305c56db5e0f293df069e474.tar.gz Ninja-94b48447792a2908305c56db5e0f293df069e474.tar.bz2 |
fix some minor style issues in RecomputeDirty
Diffstat (limited to 'src/graph.cc')
-rw-r--r-- | src/graph.cc | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/src/graph.cc b/src/graph.cc index 90791f9..2cdba80 100644 --- a/src/graph.cc +++ b/src/graph.cc @@ -31,14 +31,13 @@ bool FileStat::Stat(DiskInterface* disk_interface) { bool Edge::RecomputeDirty(State* state, DiskInterface* disk_interface, string* err) { bool dirty = false; + outputs_ready_ = true; if (!rule_->depfile_.empty()) { if (!LoadDepFile(state, disk_interface, err)) return false; } - outputs_ready_ = true; - // Visit all inputs; we're dirty if any of the inputs are dirty. time_t most_recent_input = 1; for (vector<Node*>::iterator i = inputs_.begin(); i != inputs_.end(); ++i) { @@ -53,19 +52,20 @@ bool Edge::RecomputeDirty(State* state, DiskInterface* disk_interface, } // If an input is not ready, neither are our outputs. - if (Edge* edge = (*i)->in_edge_) + if (Edge* edge = (*i)->in_edge_) { if (!edge->outputs_ready_) outputs_ready_ = false; + } if (!is_order_only(i - inputs_.begin())) { - // If a regular input is dirty (or missing), we're dirty. - // Otherwise consider mtime. - if ((*i)->dirty_) { - dirty = true; - } else { - if ((*i)->file_->mtime_ > most_recent_input) - most_recent_input = (*i)->file_->mtime_; - } + // If a regular input is dirty (or missing), we're dirty. + // Otherwise consider mtime. + if ((*i)->dirty_) { + dirty = true; + } else { + if ((*i)->file_->mtime_ > most_recent_input) + most_recent_input = (*i)->file_->mtime_; + } } } |