diff options
author | Stephen Kelly <steveire@gmail.com> | 2015-05-16 03:33:19 (GMT) |
---|---|---|
committer | Stephen Kelly <steveire@gmail.com> | 2015-05-17 14:50:18 (GMT) |
commit | 7872201bf69610579b6b1fab4b5389b692c82089 (patch) | |
tree | b2490214567d9b541f4500fb8edeedf00108777a /Source | |
parent | fa85829712aac5d274706c5ddd7e719819155713 (diff) | |
download | CMake-7872201bf69610579b6b1fab4b5389b692c82089.zip CMake-7872201bf69610579b6b1fab4b5389b692c82089.tar.gz CMake-7872201bf69610579b6b1fab4b5389b692c82089.tar.bz2 |
cmDefinitions: Remove internal MakeClosure method.
There is no need to have a separate method, or to pass an external
set to it.
Diffstat (limited to 'Source')
-rw-r--r-- | Source/cmDefinitions.cxx | 17 | ||||
-rw-r--r-- | Source/cmDefinitions.h | 3 |
2 files changed, 4 insertions, 16 deletions
diff --git a/Source/cmDefinitions.cxx b/Source/cmDefinitions.cxx index f54bc4d..581f259 100644 --- a/Source/cmDefinitions.cxx +++ b/Source/cmDefinitions.cxx @@ -81,18 +81,8 @@ cmDefinitions cmDefinitions::MakeClosure( std::list<cmDefinitions>::const_reverse_iterator rbegin, std::list<cmDefinitions>::const_reverse_iterator rend) { - std::set<std::string> undefined; cmDefinitions closure; - closure.MakeClosure(undefined, rbegin, rend); - return closure; -} - -//---------------------------------------------------------------------------- -void -cmDefinitions::MakeClosure(std::set<std::string>& undefined, - std::list<cmDefinitions>::const_reverse_iterator rbegin, - std::list<cmDefinitions>::const_reverse_iterator rend) -{ + std::set<std::string> undefined; for (std::list<cmDefinitions>::const_reverse_iterator it = rbegin; it != rend; ++it) { @@ -101,12 +91,12 @@ cmDefinitions::MakeClosure(std::set<std::string>& undefined, mi != it->Map.end(); ++mi) { // Use this key if it is not already set or unset. - if(this->Map.find(mi->first) == this->Map.end() && + if(closure.Map.find(mi->first) == closure.Map.end() && undefined.find(mi->first) == undefined.end()) { if(mi->second.Exists) { - this->Map.insert(*mi); + closure.Map.insert(*mi); } else { @@ -115,6 +105,7 @@ cmDefinitions::MakeClosure(std::set<std::string>& undefined, } } } + return closure; } //---------------------------------------------------------------------------- diff --git a/Source/cmDefinitions.h b/Source/cmDefinitions.h index b244793..e762b41 100644 --- a/Source/cmDefinitions.h +++ b/Source/cmDefinitions.h @@ -76,9 +76,6 @@ private: static Def const& GetInternal(const std::string& key, std::list<cmDefinitions>::reverse_iterator rbegin, std::list<cmDefinitions>::reverse_iterator rend); - void MakeClosure(std::set<std::string>& undefined, - std::list<cmDefinitions>::const_reverse_iterator rbegin, - std::list<cmDefinitions>::const_reverse_iterator rend); }; #endif |