cmMacroCommand: Remove counting variable.

Start iteration at correct starting point directly.
This commit is contained in:
Stephen Kelly 2015-01-25 15:47:21 +01:00
parent 11ecc31d0a
commit 0a4e5674ec

View File

@ -167,11 +167,8 @@ bool cmMacroHelperCommand::InvokeInitialPass
if (expandedArgs.size() > this->Args.size() - 1) if (expandedArgs.size() > this->Args.size() - 1)
{ {
std::vector<std::string>::const_iterator eit std::vector<std::string>::const_iterator eit
= expandedArgs.begin(); = expandedArgs.begin() + (this->Args.size() - 1);
std::vector<std::string>::size_type cnt = 0;
for( ; eit != expandedArgs.end(); ++eit) for( ; eit != expandedArgs.end(); ++eit)
{
if ( cnt >= this->Args.size()-1 )
{ {
if (!argnDef.empty()) if (!argnDef.empty())
{ {
@ -179,8 +176,6 @@ bool cmMacroHelperCommand::InvokeInitialPass
} }
argnDef += *eit; argnDef += *eit;
} }
cnt ++;
}
} }
argnDefInitialized = true; argnDefInitialized = true;
} }