瀏覽代碼

ctest.cxx: Optimize `std::ostream::operator<<` calls

Alex Turbov 3 年之前
父節點
當前提交
9ae6569bfe
共有 1 個文件被更改,包括 4 次插入6 次删除
  1. 4 6
      Source/ctest.cxx

+ 4 - 6
Source/ctest.cxx

@@ -187,8 +187,7 @@ int main(int argc, char const* const* argv)
 
 
   if (cmSystemTools::GetCurrentWorkingDirectory().empty()) {
   if (cmSystemTools::GetCurrentWorkingDirectory().empty()) {
     cmCTestLog(&inst, ERROR_MESSAGE,
     cmCTestLog(&inst, ERROR_MESSAGE,
-               "Current working directory cannot be established."
-                 << std::endl);
+               "Current working directory cannot be established.\n");
     return 1;
     return 1;
   }
   }
 
 
@@ -200,10 +199,9 @@ int main(int argc, char const* const* argv)
         cmSystemTools::FileExists("DartTestfile.txt"))) {
         cmSystemTools::FileExists("DartTestfile.txt"))) {
     if (argc == 1) {
     if (argc == 1) {
       cmCTestLog(&inst, ERROR_MESSAGE,
       cmCTestLog(&inst, ERROR_MESSAGE,
-                 "*********************************"
-                   << std::endl
-                   << "No test configuration file found!" << std::endl
-                   << "*********************************" << std::endl);
+                 "*********************************\n"
+                 "No test configuration file found!\n"
+                 "*********************************\n");
     }
     }
     cmDocumentation doc;
     cmDocumentation doc;
     doc.addCTestStandardDocSections();
     doc.addCTestStandardDocSections();