Browse Source

clang-tidy: Fix performance-for-range-copy diagnostic in Xcode generator

Fix diagnostics that appear on macOS with clang-tidy-8.
Brad King 6 years ago
parent
commit
f1f57cffc7
1 changed files with 2 additions and 2 deletions
  1. 2 2
      Source/cmGlobalXCodeGenerator.cxx

+ 2 - 2
Source/cmGlobalXCodeGenerator.cxx

@@ -1254,7 +1254,7 @@ bool cmGlobalXCodeGenerator::CreateXCodeTarget(
         bundleFiles[tsFlags.MacFolder].push_back(sourceFile);
       }
     }
-    for (auto keySources : bundleFiles) {
+    for (auto const& keySources : bundleFiles) {
       cmXCodeObject* copyFilesBuildPhase =
         this->CreateObject(cmXCodeObject::PBXCopyFilesBuildPhase);
       copyFilesBuildPhase->SetComment("Copy files");
@@ -1302,7 +1302,7 @@ bool cmGlobalXCodeGenerator::CreateXCodeTarget(
         bundleFiles[tsFlags.MacFolder].push_back(sourceFile);
       }
     }
-    for (auto keySources : bundleFiles) {
+    for (auto const& keySources : bundleFiles) {
       cmXCodeObject* copyFilesBuildPhase =
         this->CreateObject(cmXCodeObject::PBXCopyFilesBuildPhase);
       copyFilesBuildPhase->SetComment("Copy files");