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,
|
void cmDefinitions::MakeClosure(std::set<std::string>& undefined,
|
||||||
cmDefinitions const* defs)
|
cmDefinitions const* defs)
|
||||||
{
|
{
|
||||||
|
while(defs)
|
||||||
|
{
|
||||||
// Consider local definitions.
|
// Consider local definitions.
|
||||||
for(MapType::const_iterator mi = defs->Map.begin();
|
for(MapType::const_iterator mi = defs->Map.begin();
|
||||||
mi != defs->Map.end(); ++mi)
|
mi != defs->Map.end(); ++mi)
|
||||||
|
@ -105,11 +107,7 @@ void cmDefinitions::MakeClosure(std::set<std::string>& undefined,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
defs = defs->Up;
|
||||||
// Traverse parents.
|
|
||||||
if(cmDefinitions const* up = defs->Up)
|
|
||||||
{
|
|
||||||
this->MakeClosure(undefined, up);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue