From ad0b0089ab9f094192f6109067d79ef5e66c85b7 Mon Sep 17 00:00:00 2001 From: Stephen Kelly Date: Sun, 2 Aug 2015 09:14:28 +0200 Subject: cmLocalGenerator: Simplify GetFeature implementation. --- Source/cmLocalGenerator.cxx | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/Source/cmLocalGenerator.cxx b/Source/cmLocalGenerator.cxx index 169cdf4..2a88e3c 100644 --- a/Source/cmLocalGenerator.cxx +++ b/Source/cmLocalGenerator.cxx @@ -2368,19 +2368,15 @@ void cmLocalGenerator::AppendFeatureOptions( const char* cmLocalGenerator::GetFeature(const std::string& feature, const std::string& config) { + std::string featureName = feature; // TODO: Define accumulation policy for features (prepend, append, replace). // Currently we always replace. if(!config.empty()) { - std::string featureConfig = feature; - featureConfig += "_"; - featureConfig += cmSystemTools::UpperCase(config); - if(const char* value = this->Makefile->GetProperty(featureConfig)) - { - return value; - } + featureName += "_"; + featureName += cmSystemTools::UpperCase(config); } - if(const char* value = this->Makefile->GetProperty(feature)) + if(const char* value = this->Makefile->GetProperty(featureName)) { return value; } -- cgit v0.12