cmLocalGenerator: Make GetFeature tail-recursive.

This commit is contained in:
Stephen Kelly committed 2015-08-24 20:04:37 +02:00
1 parent f4150bd88d
commit 314c9ae33b
1 file changed
+4 -3
+4 -3
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);
}
//----------------------------------------------------------------------------