From 4d71bea02c5269c7648913e117d0863860139bd4 Mon Sep 17 00:00:00 2001 From: Rolf Eike Beer Date: Mon, 9 Sep 2019 08:15:29 +0200 Subject: cmLocalGenerator::AddConfigVariableFlags: optimize string construction --- Source/cmLocalGenerator.cxx | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/Source/cmLocalGenerator.cxx b/Source/cmLocalGenerator.cxx index 9152e94..93b26ed 100644 --- a/Source/cmLocalGenerator.cxx +++ b/Source/cmLocalGenerator.cxx @@ -2089,12 +2089,11 @@ void cmLocalGenerator::AddConfigVariableFlags(std::string& flags, const std::string& config) { // Add the flags from the variable itself. - std::string flagsVar = var; - this->AppendFlags(flags, this->Makefile->GetSafeDefinition(flagsVar)); + this->AppendFlags(flags, this->Makefile->GetSafeDefinition(var)); // Add the flags from the build-type specific variable. if (!config.empty()) { - flagsVar += "_"; - flagsVar += cmSystemTools::UpperCase(config); + const std::string flagsVar = + cmStrCat(var, '_', cmSystemTools::UpperCase(config)); this->AppendFlags(flags, this->Makefile->GetSafeDefinition(flagsVar)); } } -- cgit v0.12