From 7eb0dfa0622afe078c2e131ee1cbad293960b634 Mon Sep 17 00:00:00 2001 From: Stephen Kelly Date: Mon, 18 May 2015 21:41:42 +0200 Subject: cmMakefile: Use std::set::insert API to simplify CMP0054 handling. --- Source/cmMakefile.cxx | 10 +--------- 1 file changed, 1 insertion(+), 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; } //---------------------------------------------------------------------------- -- cgit v0.12