Browse Source

Merge topic 'fbuild_small_cleanup'

a63c1b4a84 FASTBuild: fix excessive std::to_string

Acked-by: Kitware Robot <[email protected]>
Merge-request: !11225
Brad King 1 month ago
parent
commit
4fb7570c31

+ 4 - 6
Source/cmFastbuildNormalTargetGenerator.cxx

@@ -1375,8 +1375,7 @@ void cmFastbuildNormalTargetGenerator::GenerateObjects(FastbuildTarget& target)
 
   for (auto& val : nodesPermutations) {
     auto& objectListNode = val.second;
-    objectListNode.Name =
-      cmStrCat(objectListNode.Name, "_", std::to_string(++groupNameCount));
+    objectListNode.Name = cmStrCat(objectListNode.Name, "_", ++groupNameCount);
     LogMessage(cmStrCat("ObjectList name: ", objectListNode.Name));
   }
   std::vector<FastbuildObjectListNode>& objects = target.ObjectListNodes;
@@ -1476,8 +1475,7 @@ cmFastbuildNormalTargetGenerator::GenerateUnity(
     while (!obj.CompilerInputFiles.empty()) {
       FastbuildUnityNode node =
         GetOneUnity(isolatedSources, obj.CompilerInputFiles, unitySize);
-      node.Name =
-        cmStrCat(this->GetName(), "_Unity_", std::to_string(++unityNumber));
+      node.Name = cmStrCat(this->GetName(), "_Unity_", ++unityNumber);
       node.UnityOutputPath = obj.CompilerOutputPath;
       node.UnityOutputPattern = cmStrCat(node.Name, ext);
 
@@ -1523,8 +1521,8 @@ FastbuildUnityNode cmFastbuildNormalTargetGenerator::GenerateGroupedUnityNode(
       if (iter == inputFiles.end()) {
         continue;
       }
-      node.Name = cmStrCat(this->GetName(), "_Unity_Group_", group, '_',
-                           std::to_string(++groupId));
+      node.Name =
+        cmStrCat(this->GetName(), "_Unity_Group_", group, '_', ++groupId);
       node.UnityInputFiles.emplace_back(source);
 
       // Remove from the general batching.

+ 1 - 2
Source/cmGlobalFastbuildGenerator.cxx

@@ -1596,8 +1596,7 @@ void cmGlobalFastbuildGenerator::WriteSolution()
       std::move(projectsInFolder.begin(), projectsInFolder.end(),
                 std::back_inserter(VSProjectsWithoutFolder));
     } else {
-      std::string folderName =
-        cmStrCat("Folder_", std::to_string(++folderNumber));
+      std::string folderName = cmStrCat("Folder_", ++folderNumber);
       WriteStruct(
         folderName,
         { { "Path", Quote(pathToFolder) },