diff options
author | Brad King <brad.king@kitware.com> | 2014-09-22 13:12:58 (GMT) |
---|---|---|
committer | CMake Topic Stage <kwrobot@kitware.com> | 2014-09-22 13:12:58 (GMT) |
commit | d8dde37d609fd0badfa4c9d13c927c2d2ed27902 (patch) | |
tree | 7ef9754a483df0c1fe2da9767cfff73d3b913ec0 | |
parent | d4713b84b70ffc7da81f8b247f943fa93bd5899f (diff) | |
parent | 80bda1684d48b19a05637fe4167b5f9b1fd8ce2d (diff) | |
download | CMake-d8dde37d609fd0badfa4c9d13c927c2d2ed27902.zip CMake-d8dde37d609fd0badfa4c9d13c927c2d2ed27902.tar.gz CMake-d8dde37d609fd0badfa4c9d13c927c2d2ed27902.tar.bz2 |
Merge topic 'minor-cleanups'
80bda168 Simplify use of binary_search.
1927e4ba Remove const char string comparison helper.
-rw-r--r-- | Source/cmGeneratorTarget.cxx | 4 | ||||
-rw-r--r-- | Source/cmStandardIncludes.h | 6 |
2 files changed, 1 insertions, 9 deletions
diff --git a/Source/cmGeneratorTarget.cxx b/Source/cmGeneratorTarget.cxx index 9a42ca2..14b5a92 100644 --- a/Source/cmGeneratorTarget.cxx +++ b/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); } //---------------------------------------------------------------------------- diff --git a/Source/cmStandardIncludes.h b/Source/cmStandardIncludes.h index 3731502..8baf7b3 100644 --- a/Source/cmStandardIncludes.h +++ b/Source/cmStandardIncludes.h @@ -462,12 +462,6 @@ struct cmStrCmp { return strcmp(input, m_test.c_str()) == 0; } - // For use with binary_search - bool operator()(const char *str1, const char *str2) const - { - return strcmp(str1, str2) < 0; - } - private: const std::string m_test; }; |