Explorar el Código

cmMakefile: Use std::set::insert API to simplify CMP0054 handling.

Stephen Kelly hace 10 años
padre
commit
7eb0dfa062
Se han modificado 1 ficheros con 1 adiciones y 9 borrados
  1. 1 9
      Source/cmMakefile.cxx

+ 1 - 9
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;
 }
 
 //----------------------------------------------------------------------------