summaryrefslogtreecommitdiffstats
path: root/Source/cmLocalGenerator.cxx
diff options
context:
space:
mode:
authorStephen Kelly <steveire@gmail.com>2015-08-02 07:16:17 (GMT)
committerStephen Kelly <steveire@gmail.com>2015-08-24 18:04:37 (GMT)
commit7441fde34abf5a3eab58917b8bf4acb89d72c00c (patch)
tree8548c12a94a986b173fdb9a3c26bb4f66502e6c0 /Source/cmLocalGenerator.cxx
parentad0b0089ab9f094192f6109067d79ef5e66c85b7 (diff)
downloadCMake-7441fde34abf5a3eab58917b8bf4acb89d72c00c.zip
CMake-7441fde34abf5a3eab58917b8bf4acb89d72c00c.tar.gz
CMake-7441fde34abf5a3eab58917b8bf4acb89d72c00c.tar.bz2
cmLocalGenerator: Convert GetFeature recursion to loop.
Diffstat (limited to 'Source/cmLocalGenerator.cxx')
-rw-r--r--Source/cmLocalGenerator.cxx16
1 files changed, 8 insertions, 8 deletions
diff --git a/Source/cmLocalGenerator.cxx b/Source/cmLocalGenerator.cxx
index 2a88e3c..8e12eb6 100644
--- a/Source/cmLocalGenerator.cxx
+++ b/Source/cmLocalGenerator.cxx
@@ -2376,16 +2376,16 @@ const char* cmLocalGenerator::GetFeature(const std::string& feature,
featureName += "_";
featureName += cmSystemTools::UpperCase(config);
}
- if(const char* value = this->Makefile->GetProperty(featureName))
+ cmLocalGenerator* lg = this;
+ while(lg)
{
- return value;
- }
- cmLocalGenerator* parent = this->GetParent();
- if(!parent)
- {
- return 0;
+ if(const char* value = lg->GetMakefile()->GetProperty(featureName))
+ {
+ return value;
+ }
+ lg = lg->GetParent();
}
- return parent->GetFeature(feature, config);
+ return 0;
}
//----------------------------------------------------------------------------