cmMakefile: Use early return to reduce nested code.

This commit is contained in:
Stephen Kelly 2015-05-17 13:24:18 +02:00
parent bdd1aa91ae
commit c8cb66880c
1 changed files with 16 additions and 15 deletions

View File

@ -110,8 +110,11 @@ public:
++it;
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
// directory's scope was initialized by the closure of the parent
// scope, so we do not need to localize the definition first.
@ -126,8 +129,6 @@ public:
}
return true;
}
return false;
}
// First localize the definition in the current scope.
this->GetDefinition(var);