diff options
author | Stephen Kelly <steveire@gmail.com> | 2015-05-18 19:41:42 (GMT) |
---|---|---|
committer | Stephen Kelly <steveire@gmail.com> | 2015-05-18 21:55:43 (GMT) |
commit | 7eb0dfa0622afe078c2e131ee1cbad293960b634 (patch) | |
tree | 3ed8bed31a0febd23ef3fbbdecfceebe78c8ea46 | |
parent | f9785e0cb6c823849bb344e487d9e70d9fdaddb4 (diff) | |
download | CMake-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.cxx | 10 |
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; } //---------------------------------------------------------------------------- |