diff options
author | Stephen Kelly <steveire@gmail.com> | 2015-08-02 07:11:55 (GMT) |
---|---|---|
committer | Stephen Kelly <steveire@gmail.com> | 2015-08-24 18:04:37 (GMT) |
commit | 314c9ae33bfd304c9622b89ec62bca052f6e0d39 (patch) | |
tree | 5c9371d863764fa7102fd076f36d552a6871fea3 /Source/cmLocalGenerator.cxx | |
parent | f4150bd88d80f4a236ea5b0d648d8cc3122092fc (diff) | |
download | CMake-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.cxx | 7 |
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); } //---------------------------------------------------------------------------- |