summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorStephen Kelly <steveire@gmail.com>2015-05-18 19:41:42 (GMT)
committerStephen Kelly <steveire@gmail.com>2015-05-18 21:55:43 (GMT)
commit7eb0dfa0622afe078c2e131ee1cbad293960b634 (patch)
tree3ed8bed31a0febd23ef3fbbdecfceebe78c8ea46
parentf9785e0cb6c823849bb344e487d9e70d9fdaddb4 (diff)
downloadCMake-7eb0dfa0622afe078c2e131ee1cbad293960b634.zip
CMake-7eb0dfa0622afe078c2e131ee1cbad293960b634.tar.gz
CMake-7eb0dfa0622afe078c2e131ee1cbad293960b634.tar.bz2
cmMakefile: Use std::set::insert API to simplify CMP0054 handling.
-rw-r--r--Source/cmMakefile.cxx10
1 files changed, 1 insertions, 9 deletions
diff --git a/Source/cmMakefile.cxx b/Source/cmMakefile.cxx
index 33b7a0b..5240dc8 100644
--- a/Source/cmMakefile.cxx
+++ b/Source/cmMakefile.cxx
@@ -4945,15 +4945,7 @@ bool cmMakefile::HasCMP0054AlreadyBeenReported() const
{
cmCMP0054Id id(this->GetExecutionContext());
- bool alreadyReported =
- this->CMP0054ReportedIds.find(id) != this->CMP0054ReportedIds.end();
-
- if(!alreadyReported)
- {
- this->CMP0054ReportedIds.insert(id);
- }
-
- return alreadyReported;
+ return !this->CMP0054ReportedIds.insert(id).second;
}
//----------------------------------------------------------------------------