فهرست منبع

Simplify use of binary_search.

A local string was created when dir was a const char*. Now dir is a
std::string already so the dirString is vestigal.
Stephen Kelly 11 سال پیش
والد
کامیت
80bda1684d
1فایلهای تغییر یافته به همراه1 افزوده شده و 3 حذف شده
  1. 1 3
      Source/cmGeneratorTarget.cxx

+ 1 - 3
Source/cmGeneratorTarget.cxx

@@ -519,9 +519,7 @@ bool cmGeneratorTarget::IsSystemIncludeDirectory(const std::string& dir,
     iter = this->SystemIncludesCache.insert(entry).first;
     }
 
-  std::string dirString = dir;
-  return std::binary_search(iter->second.begin(), iter->second.end(),
-                            dirString);
+  return std::binary_search(iter->second.begin(), iter->second.end(), dir);
 }
 
 //----------------------------------------------------------------------------