cmDefinitions: Invert conditional code.
Return the simple case first.
This commit is contained in:
parent
5ccff6408c
commit
b48ea26a9d
|
@ -29,14 +29,15 @@ cmDefinitions::GetInternal(const std::string& key)
|
|||
{
|
||||
return i->second;
|
||||
}
|
||||
if(cmDefinitions* up = this->Up)
|
||||
cmDefinitions* up = this->Up;
|
||||
if(!up)
|
||||
{
|
||||
return this->NoDef;
|
||||
}
|
||||
// Query the parent scope and store the result locally.
|
||||
Def def = up->GetInternal(key);
|
||||
return this->Map.insert(MapType::value_type(key, def)).first->second;
|
||||
}
|
||||
return this->NoDef;
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
const char* cmDefinitions::Get(const std::string& key)
|
||||
|
|
Loading…
Reference in New Issue