summaryrefslogtreecommitdiffstats
path: root/Source/cmLocalGenerator.cxx
diff options
context:
space:
mode:
authorStephen Kelly <steveire@gmail.com>2015-08-02 07:11:55 (GMT)
committerStephen Kelly <steveire@gmail.com>2015-08-24 18:04:37 (GMT)
commit314c9ae33bfd304c9622b89ec62bca052f6e0d39 (patch)
tree5c9371d863764fa7102fd076f36d552a6871fea3 /Source/cmLocalGenerator.cxx
parentf4150bd88d80f4a236ea5b0d648d8cc3122092fc (diff)
downloadCMake-314c9ae33bfd304c9622b89ec62bca052f6e0d39.zip
CMake-314c9ae33bfd304c9622b89ec62bca052f6e0d39.tar.gz
CMake-314c9ae33bfd304c9622b89ec62bca052f6e0d39.tar.bz2
cmLocalGenerator: Make GetFeature tail-recursive.
Diffstat (limited to 'Source/cmLocalGenerator.cxx')
-rw-r--r--Source/cmLocalGenerator.cxx7
1 files changed, 4 insertions, 3 deletions
diff --git a/Source/cmLocalGenerator.cxx b/Source/cmLocalGenerator.cxx
index edb644d..169cdf4 100644
--- a/Source/cmLocalGenerator.cxx
+++ b/Source/cmLocalGenerator.cxx
@@ -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);
}
//----------------------------------------------------------------------------