Bläddra i källkod

strings: simplify streaming sequences

Ben Boeckel 2 år sedan
förälder
incheckning
2409f62d18

+ 5 - 6
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)));
 

+ 2 - 2
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");
       }
     }

+ 4 - 5
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"
            "'";
   }