diff options
author | Nico Weber <nicolasweber@gmx.de> | 2013-10-19 18:03:15 (GMT) |
---|---|---|
committer | Nico Weber <nicolasweber@gmx.de> | 2013-10-19 18:03:15 (GMT) |
commit | fffb8b1cddfd314acd2509f0507038d403222ab2 (patch) | |
tree | 631bc29827dc245b128e0caf1d0ddc000b409981 /src | |
parent | 3ca52649616c5539101a9cbd8b2aba36462afd98 (diff) | |
download | Ninja-fffb8b1cddfd314acd2509f0507038d403222ab2.zip Ninja-fffb8b1cddfd314acd2509f0507038d403222ab2.tar.gz Ninja-fffb8b1cddfd314acd2509f0507038d403222ab2.tar.bz2 |
Minor style fixes. No functionality change.
Diffstat (limited to 'src')
-rw-r--r-- | src/build.cc | 3 | ||||
-rw-r--r-- | src/build.h | 5 | ||||
-rw-r--r-- | src/msvc_helper-win32.cc | 10 | ||||
-rw-r--r-- | src/msvc_helper.h | 3 |
4 files changed, 13 insertions, 8 deletions
diff --git a/src/build.cc b/src/build.cc index 33aa85b..f91ff2f 100644 --- a/src/build.cc +++ b/src/build.cc @@ -717,7 +717,8 @@ bool Builder::FinishCommand(CommandRunner::Result* result, string* err) { const string deps_prefix = edge->GetBinding("msvc_deps_prefix"); if (!deps_type.empty()) { string extract_err; - if (!ExtractDeps(result, deps_type, deps_prefix, &deps_nodes, &extract_err) && + if (!ExtractDeps(result, deps_type, deps_prefix, &deps_nodes, + &extract_err) && result->success()) { if (!result->output.empty()) result->output.append("\n"); diff --git a/src/build.h b/src/build.h index 1122d84..eb3636a 100644 --- a/src/build.h +++ b/src/build.h @@ -180,8 +180,9 @@ struct Builder { BuildStatus* status_; private: - bool ExtractDeps(CommandRunner::Result* result, const string& deps_type, const string& deps_prefix, - vector<Node*>* deps_nodes, string* err); + bool ExtractDeps(CommandRunner::Result* result, const string& deps_type, + const string& deps_prefix, vector<Node*>* deps_nodes, + string* err); DiskInterface* disk_interface_; DependencyScan scan_; diff --git a/src/msvc_helper-win32.cc b/src/msvc_helper-win32.cc index 3065ab0..d2e2eb5 100644 --- a/src/msvc_helper-win32.cc +++ b/src/msvc_helper-win32.cc @@ -48,12 +48,14 @@ string EscapeForDepfile(const string& path) { } // static -string CLParser::FilterShowIncludes(const string& line, const string& deps_prefix) { - static const string deps_prefix_english = "Note: including file: "; +string CLParser::FilterShowIncludes(const string& line, + const string& deps_prefix) { + const string kDepsPrefixEnglish = "Note: including file: "; const char* in = line.c_str(); const char* end = in + line.size(); - const string& prefix = deps_prefix.empty() ? deps_prefix_english : deps_prefix; - if (end - in > (int)prefix.size() && memcmp(in, prefix.c_str(), (int)prefix.size()) == 0) { + const string& prefix = deps_prefix.empty() ? kDepsPrefixEnglish : deps_prefix; + if (end - in > (int)prefix.size() && + memcmp(in, prefix.c_str(), (int)prefix.size()) == 0) { in += prefix.size(); while (*in == ' ') ++in; diff --git a/src/msvc_helper.h b/src/msvc_helper.h index 0433769..5d7dcb0 100644 --- a/src/msvc_helper.h +++ b/src/msvc_helper.h @@ -27,7 +27,8 @@ struct CLParser { /// Parse a line of cl.exe output and extract /showIncludes info. /// If a dependency is extracted, returns a nonempty string. /// Exposed for testing. - static string FilterShowIncludes(const string& line, const string& deps_prefix); + static string FilterShowIncludes(const string& line, + const string& deps_prefix); /// Return true if a mentioned include file is a system path. /// Filtering these out reduces dependency information considerably. |