From a7fcc148bdfa5e9f2c6901b0de8192f5aa043741 Mon Sep 17 00:00:00 2001 From: Stephen Kelly Date: Sun, 18 Jan 2015 16:01:54 +0100 Subject: [PATCH] Convert loop to algorithm. --- Source/cmLocalUnixMakefileGenerator3.cxx | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/Source/cmLocalUnixMakefileGenerator3.cxx b/Source/cmLocalUnixMakefileGenerator3.cxx index 9a2186b58..785d0caaa 100644 --- a/Source/cmLocalUnixMakefileGenerator3.cxx +++ b/Source/cmLocalUnixMakefileGenerator3.cxx @@ -2396,10 +2396,7 @@ void cmLocalUnixMakefileGenerator3 std::string outputForExisting = this->ConvertToOutputForExisting(tgtDir, relRetDir); std::string prefix = cd_cmd + outputForExisting + " && "; - std::vector::iterator i = commands.begin(); - for (; i != commands.end(); ++i) - { - *i = prefix + *i; - } + std::transform(commands.begin(), commands.end(), commands.begin(), + std::bind1st(std::plus(), prefix)); } }