From 3345e2a2cc16e209f6e37caffe581b40e6ed19bb Mon Sep 17 00:00:00 2001 From: Matthias Maennich Date: Wed, 4 Oct 2017 19:02:56 +0200 Subject: cmcmd: let operator<< for NumberFormatter reset the stream's format flags --- Source/cmcmd.cxx | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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& command, -- cgit v0.12 From 85a7eaba5ec921ea9f61f340d2372f49ac5536bd Mon Sep 17 00:00:00 2001 From: Matthias Maennich Date: Thu, 5 Oct 2017 12:53:22 +0200 Subject: cmGeneratorTarget: remove dead code explicitLibraries can never be nullptr at this point --- Source/cmGeneratorTarget.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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; -- cgit v0.12 From 7eaa964e9b6619dfe3b14ebdf80026e898a9a931 Mon Sep 17 00:00:00 2001 From: Matthias Maennich Date: Thu, 5 Oct 2017 14:29:41 +0200 Subject: cmProcessTools: fix minor issue introduced by 595feb3 --- Source/cmProcessTools.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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); -- cgit v0.12 From b32b717b69063698001c8c39737bcf690763c97c Mon Sep 17 00:00:00 2001 From: Matthias Maennich Date: Thu, 5 Oct 2017 14:37:35 +0200 Subject: cmInstallCommandArguments: do not access static members through `this` --- Source/cmInstallCommandArguments.cxx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) 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 -- cgit v0.12