From 94b48447792a2908305c56db5e0f293df069e474 Mon Sep 17 00:00:00 2001 From: Evan Martin Date: Sun, 4 Dec 2011 13:11:05 -0800 Subject: fix some minor style issues in RecomputeDirty --- src/graph.cc | 22 +++++++++++----------- 1 file 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::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_; + } } } -- cgit v0.12