summaryrefslogtreecommitdiffstats
path: root/Source/cmGeneratorTarget.cxx
diff options
context:
space:
mode:
authorStephen Kelly <steveire@gmail.com>2014-08-06 13:20:24 (GMT)
committerStephen Kelly <steveire@gmail.com>2014-09-17 13:10:55 (GMT)
commit80bda1684d48b19a05637fe4167b5f9b1fd8ce2d (patch)
tree01f7ac57c4751894bcf2dcd3f76acf5386fd9f32 /Source/cmGeneratorTarget.cxx
parent1927e4bacb8e3183488c0e71a18b73aa62e5f53a (diff)
downloadCMake-80bda1684d48b19a05637fe4167b5f9b1fd8ce2d.zip
CMake-80bda1684d48b19a05637fe4167b5f9b1fd8ce2d.tar.gz
CMake-80bda1684d48b19a05637fe4167b5f9b1fd8ce2d.tar.bz2
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.
Diffstat (limited to 'Source/cmGeneratorTarget.cxx')
-rw-r--r--Source/cmGeneratorTarget.cxx4
1 files changed, 1 insertions, 3 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);
}
//----------------------------------------------------------------------------