From e5ebeae768a8310b5cfdce0aeff9419e1de51eaa Mon Sep 17 00:00:00 2001 From: Stephen Kelly Date: Wed, 11 Feb 2015 23:29:04 +0100 Subject: [PATCH] cmFunctionCommand: Split loop in two. --- Source/cmFunctionCommand.cxx | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/Source/cmFunctionCommand.cxx b/Source/cmFunctionCommand.cxx index b44e228a0..a0a14e82f 100644 --- a/Source/cmFunctionCommand.cxx +++ b/Source/cmFunctionCommand.cxx @@ -128,8 +128,6 @@ bool cmFunctionHelperCommand::InvokeInitialPass // define ARGV and ARGN std::vector::const_iterator eit; std::string argvDef; - std::string argnDef; - unsigned int cnt = 0; for ( eit = expandedArgs.begin(); eit != expandedArgs.end(); ++eit ) { if (!argvDef.empty()) @@ -137,6 +135,10 @@ bool cmFunctionHelperCommand::InvokeInitialPass argvDef += ";"; } argvDef += *eit; + } + std::string argnDef; + unsigned int cnt = 0; + for ( eit = expandedArgs.begin(); eit != expandedArgs.end(); ++eit ) if ( cnt >= this->Args.size()-1 ) { if (!argnDef.empty())