mirror of
https://github.com/Kitware/CMake.git
synced 2026-04-26 00:00:39 -05:00
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.
This commit is contained in:
@@ -519,9 +519,7 @@ bool cmGeneratorTarget::IsSystemIncludeDirectory(const std::string& dir,
|
|||||||
iter = this->SystemIncludesCache.insert(entry).first;
|
iter = this->SystemIncludesCache.insert(entry).first;
|
||||||
}
|
}
|
||||||
|
|
||||||
std::string dirString = dir;
|
return std::binary_search(iter->second.begin(), iter->second.end(), dir);
|
||||||
return std::binary_search(iter->second.begin(), iter->second.end(),
|
|
||||||
dirString);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
//----------------------------------------------------------------------------
|
//----------------------------------------------------------------------------
|
||||||
|
|||||||
Reference in New Issue
Block a user