diff options
author | Nico Weber <nicolasweber@gmx.de> | 2013-09-02 23:09:00 (GMT) |
---|---|---|
committer | Nico Weber <nicolasweber@gmx.de> | 2013-09-02 23:09:00 (GMT) |
commit | d23e718acb7cb4038473c96555cecf15556ed227 (patch) | |
tree | 5aea1c48ddec16f1da8750c234632c229e6423a9 | |
parent | 8c98c31d8090bbc8e73d193d3777384251d1b782 (diff) | |
download | Ninja-d23e718acb7cb4038473c96555cecf15556ed227.zip Ninja-d23e718acb7cb4038473c96555cecf15556ed227.tar.gz Ninja-d23e718acb7cb4038473c96555cecf15556ed227.tar.bz2 |
Simplify.
-rw-r--r-- | src/graph.cc | 25 |
1 files changed, 7 insertions, 18 deletions
diff --git a/src/graph.cc b/src/graph.cc index 8d507f7..6191998 100644 --- a/src/graph.cc +++ b/src/graph.cc @@ -327,25 +327,12 @@ void Node::Dump(const char* prefix) const { bool ImplicitDepLoader::LoadDeps(Edge* edge, string* err) { string deps_type = edge->GetBinding("deps"); - if (!deps_type.empty()) { - if (!LoadDepsFromLog(edge, err)) { - if (!err->empty()) - return false; - return false; - } - return true; - } + if (!deps_type.empty()) + return LoadDepsFromLog(edge, err); string depfile = edge->GetBinding("depfile"); - if (!depfile.empty()) { - if (!LoadDepFile(edge, depfile, err)) { - if (!err->empty()) - return false; - EXPLAIN("depfile '%s' is missing", depfile.c_str()); - return false; - } - return true; - } + if (!depfile.empty()) + return LoadDepFile(edge, depfile, err); // No deps to load. return true; @@ -360,8 +347,10 @@ bool ImplicitDepLoader::LoadDepFile(Edge* edge, const string& path, return false; } // On a missing depfile: return false and empty *err. - if (content.empty()) + if (content.empty()) { + EXPLAIN("depfile '%s' is missing", path.c_str()); return false; + } DepfileParser depfile; string depfile_err; |