mirror of
https://gitlab.kitware.com/cmake/cmake.git
synced 2026-10-11 23:43:58 +03:00
cmLocalGenerator: Make GetFeature tail-recursive.
This commit is contained in:
1 parent
f4150bd88d
commit
314c9ae33b
1 file changed
+4
-3
@@ -2384,11 +2384,12 @@ const char* cmLocalGenerator::GetFeature(const std::string& feature,
|
||||
{
|
||||
return value;
|
||||
}
|
||||
if(cmLocalGenerator* parent = this->GetParent())
|
||||
cmLocalGenerator* parent = this->GetParent();
|
||||
if(!parent)
|
||||
{
|
||||
return parent->GetFeature(feature, config);
|
||||
return 0;
|
||||
}
|
||||
return 0;
|
||||
return parent->GetFeature(feature, config);
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
|
||||
Reference in new issue
Block a user