mirror of
https://github.com/Kitware/CMake.git
synced 2026-01-11 08:20:18 -06:00
cmDefinitions: Invert conditional code.
Return the simple case first.
This commit is contained in:
@@ -29,13 +29,14 @@ cmDefinitions::GetInternal(const std::string& key)
|
||||
{
|
||||
return i->second;
|
||||
}
|
||||
if(cmDefinitions* up = this->Up)
|
||||
cmDefinitions* up = this->Up;
|
||||
if(!up)
|
||||
{
|
||||
// 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;
|
||||
}
|
||||
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;
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
|
||||
Reference in New Issue
Block a user