summaryrefslogtreecommitdiffstats
path: root/Source/cmForEachCommand.cxx
diff options
context:
space:
mode:
authorKen Martin <ken.martin@kitware.com>2003-06-23 20:26:48 (GMT)
committerKen Martin <ken.martin@kitware.com>2003-06-23 20:26:48 (GMT)
commitb56dcc2a303faf516bf64489fac8813b8142a38c (patch)
treeda773bcae7b1a0e16447fb4cc6029997d001fa48 /Source/cmForEachCommand.cxx
parent116f39d840fb78dfe33300a10d9a8f22ba41ca3b (diff)
downloadCMake-b56dcc2a303faf516bf64489fac8813b8142a38c.zip
CMake-b56dcc2a303faf516bf64489fac8813b8142a38c.tar.gz
CMake-b56dcc2a303faf516bf64489fac8813b8142a38c.tar.bz2
perf improvement
Diffstat (limited to 'Source/cmForEachCommand.cxx')
-rw-r--r--Source/cmForEachCommand.cxx7
1 files changed, 5 insertions, 2 deletions
diff --git a/Source/cmForEachCommand.cxx b/Source/cmForEachCommand.cxx
index e8d1ac6..cd6e1e2 100644
--- a/Source/cmForEachCommand.cxx
+++ b/Source/cmForEachCommand.cxx
@@ -40,6 +40,8 @@ IsFunctionBlocked(const cmListFileFunction& lff, cmMakefile &mf)
std::vector<std::string>::const_iterator j = m_Args.begin();
++j;
+ std::string tmps;
+ cmListFileArgument arg;
for( ; j != m_Args.end(); ++j)
{
// Invoke all the functions that were collected in the block.
@@ -52,9 +54,10 @@ IsFunctionBlocked(const cmListFileFunction& lff, cmMakefile &mf)
m_Functions[c].m_Arguments.begin();
k != m_Functions[c].m_Arguments.end(); ++k)
{
- std::string tmps = k->Value;
+ tmps = k->Value;
cmSystemTools::ReplaceString(tmps, variable.c_str(), j->c_str());
- cmListFileArgument arg(tmps, k->Quoted);
+ arg.Value = tmps;
+ arg.Quoted = k->Quoted;
newLFF.m_Arguments.push_back(arg);
}
mf.ExecuteCommand(newLFF);