From 8e0827b646b14028446503ac392a9ab7bb5a53a3 Mon Sep 17 00:00:00 2001 From: Stephen Kelly Date: Wed, 11 Feb 2015 19:26:33 +0100 Subject: [PATCH] cmMacroCommand: Remove intermediate arg variables. --- Source/cmMacroCommand.cxx | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/Source/cmMacroCommand.cxx b/Source/cmMacroCommand.cxx index 9fc479e33..8bbb7c6e0 100644 --- a/Source/cmMacroCommand.cxx +++ b/Source/cmMacroCommand.cxx @@ -161,9 +161,7 @@ bool cmMacroHelperCommand::InvokeInitialPass // repleace ARGN if (tmps.find("${ARGN}") != std::string::npos) { - std::string argnDef; - argnDef += expandedArgn; - cmSystemTools::ReplaceString(tmps, "${ARGN}", argnDef.c_str()); + cmSystemTools::ReplaceString(tmps, "${ARGN}", expandedArgn.c_str()); } // if the current argument of the current function has ${ARGV in it @@ -171,10 +169,7 @@ bool cmMacroHelperCommand::InvokeInitialPass if (tmps.find("${ARGV") != std::string::npos) { char argvName[60]; - - std::string argvDef; - argvDef += expandedArgv; - cmSystemTools::ReplaceString(tmps, "${ARGV}", argvDef.c_str()); + cmSystemTools::ReplaceString(tmps, "${ARGV}", expandedArgv.c_str()); // also replace the ARGV1 ARGV2 ... etc for (unsigned int t = 0; t < expandedArgs.size(); ++t)