Browse Source

cmMacroCommand: Remove counting variable.

Start iteration at correct starting point directly.
Stephen Kelly 10 years ago
parent
commit
0a4e5674ec
1 changed files with 4 additions and 9 deletions
  1. 4 9
      Source/cmMacroCommand.cxx

+ 4 - 9
Source/cmMacroCommand.cxx

@@ -167,19 +167,14 @@ 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();
-              std::vector<std::string>::size_type cnt = 0;
+                  = expandedArgs.begin() + (this->Args.size() - 1);
               for( ; eit != expandedArgs.end(); ++eit)
               for( ; eit != expandedArgs.end(); ++eit)
                 {
                 {
-                if ( cnt >= this->Args.size()-1 )
+                if (!argnDef.empty())
                   {
                   {
-                  if (!argnDef.empty())
-                    {
-                    argnDef += ";";
-                    }
-                  argnDef += *eit;
+                  argnDef += ";";
                   }
                   }
-                cnt ++;
+                argnDef += *eit;
                 }
                 }
               }
               }
             argnDefInitialized = true;
             argnDefInitialized = true;