فهرست منبع

cmGeneratorTarget: Remove unnecessary copy to local variable

Brad King 6 سال پیش
والد
کامیت
c131e62f7b
1فایلهای تغییر یافته به همراه3 افزوده شده و 4 حذف شده
  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";
         }
       }
     }