Pārlūkot izejas kodu

cmGlobalGenerator: Optimize Printable() method from GeneratedMakeCommand

Bartosz Kosiorek 6 gadi atpakaļ
vecāks
revīzija
ebc94500c1
1 mainītis faili ar 1 papildinājumiem un 14 dzēšanām
  1. 1 14
      Source/cmGlobalGenerator.h

+ 1 - 14
Source/cmGlobalGenerator.h

@@ -69,20 +69,7 @@ struct GeneratedMakeCommand
     PrimaryCommand.insert(PrimaryCommand.end(), start, end);
   }
 
-  std::string Printable() const
-  {
-    std::size_t size = PrimaryCommand.size();
-    for (auto&& i : PrimaryCommand) {
-      size += i.size();
-    }
-    std::string buffer;
-    buffer.reserve(size);
-    for (auto&& i : PrimaryCommand) {
-      buffer.append(i);
-      buffer.append(1, ' ');
-    }
-    return buffer;
-  }
+  std::string Printable() const { return cmJoin(PrimaryCommand, " "); }
 
   std::vector<std::string> PrimaryCommand;
   bool RequiresOutputForward = false;