diff options
author | Stephen Kelly <steveire@gmail.com> | 2015-02-11 18:26:33 (GMT) |
---|---|---|
committer | Stephen Kelly <steveire@gmail.com> | 2015-02-11 21:58:33 (GMT) |
commit | 8e0827b646b14028446503ac392a9ab7bb5a53a3 (patch) | |
tree | 4fb66fa58a5f08bdf7904d68a6f3521e468434e4 /Source/cmMacroCommand.cxx | |
parent | f2c49f59d8dbca936a40b62a9079fa71ca551365 (diff) | |
download | CMake-8e0827b646b14028446503ac392a9ab7bb5a53a3.zip CMake-8e0827b646b14028446503ac392a9ab7bb5a53a3.tar.gz CMake-8e0827b646b14028446503ac392a9ab7bb5a53a3.tar.bz2 |
cmMacroCommand: Remove intermediate arg variables.
Diffstat (limited to 'Source/cmMacroCommand.cxx')
-rw-r--r-- | Source/cmMacroCommand.cxx | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/Source/cmMacroCommand.cxx b/Source/cmMacroCommand.cxx index 9fc479e..8bbb7c6 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) |