Explorar el Código

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 hace 11 años
padre
commit
80bda1684d
Se han modificado 1 ficheros con 1 adiciones y 3 borrados
  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);
 }
 
 //----------------------------------------------------------------------------