diff options
author | Brad King <brad.king@kitware.com> | 2017-10-06 11:16:02 (GMT) |
---|---|---|
committer | Kitware Robot <kwrobot@kitware.com> | 2017-10-06 11:17:09 (GMT) |
commit | 7986103940d455afe0c6757ada0d908a084e448e (patch) | |
tree | 2595d7b570735ef4911607fa7ce56357be727cf2 | |
parent | e67eb42fa1a9f5ffa2f1ae9307706ddf5ec696e2 (diff) | |
parent | b32b717b69063698001c8c39737bcf690763c97c (diff) | |
download | CMake-7986103940d455afe0c6757ada0d908a084e448e.zip CMake-7986103940d455afe0c6757ada0d908a084e448e.tar.gz CMake-7986103940d455afe0c6757ada0d908a084e448e.tar.bz2 |
Merge topic 'minor-fixes'
b32b717b cmInstallCommandArguments: do not access static members through `this`
7eaa964e cmProcessTools: fix minor issue introduced by 595feb3
85a7eaba cmGeneratorTarget: remove dead code
3345e2a2 cmcmd: let operator<< for NumberFormatter reset the stream's format flags
Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !1349
-rw-r--r-- | Source/cmGeneratorTarget.cxx | 2 | ||||
-rw-r--r-- | Source/cmInstallCommandArguments.cxx | 6 | ||||
-rw-r--r-- | Source/cmProcessTools.cxx | 2 | ||||
-rw-r--r-- | Source/cmcmd.cxx | 4 |
4 files changed, 8 insertions, 6 deletions
diff --git a/Source/cmGeneratorTarget.cxx b/Source/cmGeneratorTarget.cxx index ea41204e..103d034 100644 --- a/Source/cmGeneratorTarget.cxx +++ b/Source/cmGeneratorTarget.cxx @@ -4654,7 +4654,7 @@ void cmGeneratorTarget::ComputeLinkInterfaceLibraries( "INTERFACE_LINK_LIBRARIES:\n" " " << newExplicitLibraries << "\n" << linkIfaceProp << ":\n" - " " << (explicitLibraries ? explicitLibraries : "(empty)") << "\n"; + " " << explicitLibraries << "\n"; /* clang-format on */ this->LocalGenerator->IssueMessage(cmake::AUTHOR_WARNING, w.str()); this->PolicyWarnedCMP0022 = true; diff --git a/Source/cmInstallCommandArguments.cxx b/Source/cmInstallCommandArguments.cxx index ff6420d..12abac8 100644 --- a/Source/cmInstallCommandArguments.cxx +++ b/Source/cmInstallCommandArguments.cxx @@ -39,7 +39,7 @@ const std::string& cmInstallCommandArguments::GetDestination() const if (this->GenericArguments != nullptr) { return this->GenericArguments->GetDestination(); } - return this->EmptyString; + return EmptyString; } const std::string& cmInstallCommandArguments::GetComponent() const @@ -65,7 +65,7 @@ const std::string& cmInstallCommandArguments::GetRename() const if (this->GenericArguments != nullptr) { return this->GenericArguments->GetRename(); } - return this->EmptyString; + return EmptyString; } const std::string& cmInstallCommandArguments::GetPermissions() const @@ -76,7 +76,7 @@ const std::string& cmInstallCommandArguments::GetPermissions() const if (this->GenericArguments != nullptr) { return this->GenericArguments->GetPermissions(); } - return this->EmptyString; + return EmptyString; } bool cmInstallCommandArguments::GetOptional() const diff --git a/Source/cmProcessTools.cxx b/Source/cmProcessTools.cxx index 05b1b00..7ab1fa3 100644 --- a/Source/cmProcessTools.cxx +++ b/Source/cmProcessTools.cxx @@ -38,7 +38,7 @@ void cmProcessTools::RunProcess(struct cmsysProcess_s* cp, OutputParser* out, if (err) { processOutput.DecodeText(std::string(), strdata, 2); if (!strdata.empty()) { - out->Process(strdata.c_str(), int(strdata.size())); + err->Process(strdata.c_str(), int(strdata.size())); } } cmsysProcess_WaitForExit(cp, nullptr); diff --git a/Source/cmcmd.cxx b/Source/cmcmd.cxx index c0c7d03..ed507fd 100644 --- a/Source/cmcmd.cxx +++ b/Source/cmcmd.cxx @@ -1556,11 +1556,13 @@ struct NumberFormatter std::ostream& operator<<(std::ostream& stream, NumberFormatter const& formatter) { + auto const& flags = stream.flags(); if (formatter.Format == FORMAT_DECIMAL) { - stream << formatter.Value; + stream << std::dec << formatter.Value; } else { stream << "0x" << std::hex << formatter.Value; } + stream.flags(flags); return stream; } static bool RunCommand(const char* comment, std::vector<std::string>& command, |