Explorar el Código

cmGeneratorTarget: Remove unnecessary copy to local variable

Brad King hace 6 años
padre
commit
c131e62f7b
Se han modificado 1 ficheros con 3 adiciones y 4 borrados
  1. 3 4
      Source/cmGeneratorTarget.cxx

+ 3 - 4
Source/cmGeneratorTarget.cxx

@@ -2856,12 +2856,11 @@ static void processIncludeDirectories(
       if (!cmSystemTools::IsOff(entryInclude)) {
         cmSystemTools::ConvertToUnixSlashes(entryInclude);
       }
-      std::string inc = entryInclude;
 
-      if (uniqueIncludes.insert(inc).second) {
-        includes.emplace_back(inc, entry->GetBacktrace());
+      if (uniqueIncludes.insert(entryInclude).second) {
+        includes.emplace_back(entryInclude, entry->GetBacktrace());
         if (debugIncludes) {
-          usedIncludes += " * " + inc + "\n";
+          usedIncludes += " * " + entryInclude + "\n";
         }
       }
     }