From 2409f62d18b714f3342db99201eadc13420708da Mon Sep 17 00:00:00 2001 From: Ben Boeckel Date: Thu, 27 Jul 2023 14:57:48 -0400 Subject: strings: simplify streaming sequences --- Source/CPack/WiX/cmCPackWIXGenerator.cxx | 11 +++++------ Source/cmGlobalVisualStudioGenerator.cxx | 4 ++-- Source/cmVisualStudio10TargetGenerator.cxx | 9 ++++----- 3 files changed, 11 insertions(+), 13 deletions(-) diff --git a/Source/CPack/WiX/cmCPackWIXGenerator.cxx b/Source/CPack/WiX/cmCPackWIXGenerator.cxx index 45f91b2..3a116db 100644 --- a/Source/CPack/WiX/cmCPackWIXGenerator.cxx +++ b/Source/CPack/WiX/cmCPackWIXGenerator.cxx @@ -103,11 +103,10 @@ bool cmCPackWIXGenerator::RunCandleCommand(std::string const& sourceFile, } std::ostringstream command; - command << QuotePath(executable); - command << " -nologo" + command << QuotePath(executable) + << " -nologo" " -arch " - << arch; - command << " -out " << QuotePath(objectFile); + << arch << " -out " << QuotePath(objectFile); for (std::string const& ext : CandleExtensions) { command << " -ext " << QuotePath(ext); @@ -132,8 +131,8 @@ bool cmCPackWIXGenerator::RunLightCommand(std::string const& objectFiles) } std::ostringstream command; - command << QuotePath(executable); - command << " -nologo" + command << QuotePath(executable) + << " -nologo" " -out " << QuotePath(CMakeToWixPath(packageFileNames.at(0))); diff --git a/Source/cmGlobalVisualStudioGenerator.cxx b/Source/cmGlobalVisualStudioGenerator.cxx index 65c8c38..ad93b6c 100644 --- a/Source/cmGlobalVisualStudioGenerator.cxx +++ b/Source/cmGlobalVisualStudioGenerator.cxx @@ -286,8 +286,8 @@ void cmGlobalVisualStudioGenerator::ConfigureCMakeVisualStudioMacros() if (!cmSystemTools::FileTimeCompare(src, dst, &res) || res > 0) { if (!cmSystemTools::CopyFileAlways(src, dst)) { std::ostringstream oss; - oss << "Could not copy from: " << src << std::endl; - oss << " to: " << dst << std::endl; + oss << "Could not copy from: " << src << std::endl + << " to: " << dst << std::endl; cmSystemTools::Message(oss.str(), "Warning"); } } diff --git a/Source/cmVisualStudio10TargetGenerator.cxx b/Source/cmVisualStudio10TargetGenerator.cxx index c7088d5..ddb08ba 100644 --- a/Source/cmVisualStudio10TargetGenerator.cxx +++ b/Source/cmVisualStudio10TargetGenerator.cxx @@ -304,15 +304,14 @@ std::string cmVisualStudio10TargetGenerator::CalcCondition( const std::string& config) const { std::ostringstream oss; - oss << "'$(Configuration)|$(Platform)'=='"; - oss << config << "|" << this->Platform; - oss << "'"; + oss << "'$(Configuration)|$(Platform)'=='" << config << "|" << this->Platform + << "'"; // handle special case for 32 bit C# targets if (this->ProjectType == VsProjectType::csproj && this->Platform == "Win32"_s) { oss << " Or " - "'$(Configuration)|$(Platform)'=='"; - oss << config + "'$(Configuration)|$(Platform)'=='" + << config << "|x86" "'"; } -- cgit v0.12