diff options
author | Stephen Kelly <steveire@gmail.com> | 2015-02-11 19:25:44 (GMT) |
---|---|---|
committer | Stephen Kelly <steveire@gmail.com> | 2015-02-11 21:58:34 (GMT) |
commit | 6774c92b5809b80c767ef8094b2f26d06556e0fd (patch) | |
tree | a2d55e46e2a4c1d72e552778d990e31d55ea4152 | |
parent | 2c4a7298fcb3ac6a6b6c0a9545b343c814f3d6ec (diff) | |
download | CMake-6774c92b5809b80c767ef8094b2f26d06556e0fd.zip CMake-6774c92b5809b80c767ef8094b2f26d06556e0fd.tar.gz CMake-6774c92b5809b80c767ef8094b2f26d06556e0fd.tar.bz2 |
cmMacroCommand: Declare tmps in the scope that it's used.
We don't particularly need to reuse the string memory here, and this
pattern is not common in CMake.
-rw-r--r-- | Source/cmMacroCommand.cxx | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/Source/cmMacroCommand.cxx b/Source/cmMacroCommand.cxx index bd53b1e..6635fee 100644 --- a/Source/cmMacroCommand.cxx +++ b/Source/cmMacroCommand.cxx @@ -84,8 +84,6 @@ bool cmMacroHelperCommand::InvokeInitialPass std::vector<std::string> expandedArgs; this->Makefile->ExpandArguments(args, expandedArgs); - std::string tmps; - // make sure the number of arguments passed is at least the number // required by the signature if (expandedArgs.size() < this->Args.size() - 1) @@ -151,7 +149,7 @@ bool cmMacroHelperCommand::InvokeInitialPass } else { - tmps = k->Value; + std::string tmps = k->Value; // replace formal arguments for (unsigned int j = 0; j < variables.size(); ++j) { |