cmDefinitions: Replace recursion with loop.
This commit is contained in:
parent
24885d4efa
commit
f983d8913b
|
@ -87,6 +87,8 @@ cmDefinitions cmDefinitions::MakeClosure() const
|
|||
void cmDefinitions::MakeClosure(std::set<std::string>& undefined,
|
||||
cmDefinitions const* defs)
|
||||
{
|
||||
while(defs)
|
||||
{
|
||||
// Consider local definitions.
|
||||
for(MapType::const_iterator mi = defs->Map.begin();
|
||||
mi != defs->Map.end(); ++mi)
|
||||
|
@ -105,11 +107,7 @@ void cmDefinitions::MakeClosure(std::set<std::string>& undefined,
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Traverse parents.
|
||||
if(cmDefinitions const* up = defs->Up)
|
||||
{
|
||||
this->MakeClosure(undefined, up);
|
||||
defs = defs->Up;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue