cmMakefile: Use early return to reduce nested code.
This commit is contained in:
parent
bdd1aa91ae
commit
c8cb66880c
|
@ -110,8 +110,11 @@ public:
|
||||||
++it;
|
++it;
|
||||||
if(it == this->VarStack.rend())
|
if(it == this->VarStack.rend())
|
||||||
{
|
{
|
||||||
if(cmLocalGenerator* plg = mf->GetLocalGenerator()->GetParent())
|
cmLocalGenerator* plg = mf->GetLocalGenerator()->GetParent();
|
||||||
|
if(!plg)
|
||||||
{
|
{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
// Update the definition in the parent directory top scope. This
|
// Update the definition in the parent directory top scope. This
|
||||||
// directory's scope was initialized by the closure of the parent
|
// directory's scope was initialized by the closure of the parent
|
||||||
// scope, so we do not need to localize the definition first.
|
// scope, so we do not need to localize the definition first.
|
||||||
|
@ -126,8 +129,6 @@ public:
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
return false;
|
|
||||||
}
|
|
||||||
// First localize the definition in the current scope.
|
// First localize the definition in the current scope.
|
||||||
this->GetDefinition(var);
|
this->GetDefinition(var);
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue