cmDefinitions: Remove internal MakeClosure method.
There is no need to have a separate method, or to pass an external set to it.
This commit is contained in:
parent
fa85829712
commit
7872201bf6
|
@ -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;
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue