cmLocalGenerator: Make GetFeature tail-recursive.

This commit is contained in:
Stephen Kelly 2015-08-02 09:11:55 +02:00
parent f4150bd88d
commit 314c9ae33b
1 changed files with 4 additions and 3 deletions

View File

@ -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);
}
//----------------------------------------------------------------------------