From d46c4f0727acb35963dfda579cd5c9efd63aab01 Mon Sep 17 00:00:00 2001 From: Stephen Kelly Date: Sun, 25 Jan 2015 15:07:27 +0100 Subject: Extract a prefix variable from loop. --- Source/cmLocalUnixMakefileGenerator3.cxx | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/Source/cmLocalUnixMakefileGenerator3.cxx b/Source/cmLocalUnixMakefileGenerator3.cxx index 13c47c5..9a2186b 100644 --- a/Source/cmLocalUnixMakefileGenerator3.cxx +++ b/Source/cmLocalUnixMakefileGenerator3.cxx @@ -2395,14 +2395,11 @@ void cmLocalUnixMakefileGenerator3 // each command. std::string outputForExisting = this->ConvertToOutputForExisting(tgtDir, relRetDir); + std::string prefix = cd_cmd + outputForExisting + " && "; std::vector::iterator i = commands.begin(); for (; i != commands.end(); ++i) { - std::string cmd = cd_cmd; - cmd += outputForExisting; - cmd += " && "; - cmd += *i; - *i = cmd; + *i = prefix + *i; } } } -- cgit v0.12