summaryrefslogtreecommitdiffstats
path: root/Source/cmFunctionCommand.cxx
diff options
context:
space:
mode:
authorStephen Kelly <steveire@gmail.com>2015-02-11 22:31:22 (GMT)
committerStephen Kelly <steveire@gmail.com>2015-02-12 19:25:21 (GMT)
commitfc1cf2654de04ed8f6954dc1907ab1dcb8bb946e (patch)
tree7b8683f13ab7fe32adb41099203fca987cb069c4 /Source/cmFunctionCommand.cxx
parente5ebeae768a8310b5cfdce0aeff9419e1de51eaa (diff)
downloadCMake-fc1cf2654de04ed8f6954dc1907ab1dcb8bb946e.zip
CMake-fc1cf2654de04ed8f6954dc1907ab1dcb8bb946e.tar.gz
CMake-fc1cf2654de04ed8f6954dc1907ab1dcb8bb946e.tar.bz2
cmFunctionCommand: Remove counting variable.
Start iteration at correct starting point directly.
Diffstat (limited to 'Source/cmFunctionCommand.cxx')
-rw-r--r--Source/cmFunctionCommand.cxx14
1 files changed, 5 insertions, 9 deletions
diff --git a/Source/cmFunctionCommand.cxx b/Source/cmFunctionCommand.cxx
index a0a14e8..088a697 100644
--- a/Source/cmFunctionCommand.cxx
+++ b/Source/cmFunctionCommand.cxx
@@ -137,17 +137,13 @@ bool cmFunctionHelperCommand::InvokeInitialPass
argvDef += *eit;
}
std::string argnDef;
- unsigned int cnt = 0;
- for ( eit = expandedArgs.begin(); eit != expandedArgs.end(); ++eit )
- if ( cnt >= this->Args.size()-1 )
+ eit = expandedArgs.begin() + (this->Args.size()-1);
+ for ( ; eit != expandedArgs.end(); ++eit)
+ if (!argnDef.empty())
{
- if (!argnDef.empty())
- {
- argnDef += ";";
- }
- argnDef += *eit;
+ argnDef += ";";
}
- cnt ++;
+ argnDef += *eit;
}
this->Makefile->AddDefinition("ARGV", argvDef.c_str());
this->Makefile->MarkVariableAsUsed("ARGV");