[Cmake-commits] CMake branch, next, updated. v3.1.0-2128-geaaf5aa
Stephen Kelly
steveire at gmail.com
Sun Jan 18 12:24:33 EST 2015
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "CMake".
The branch, next has been updated
via eaaf5aab1a9c286a3d7470880e0c1590fd6bb9a7 (commit)
via fa889c4d2f49ed4b3edc8e7820b4d9bbfeeeb2a3 (commit)
via 8211010c3f0d262cd7d300856f34a3af01f766b3 (commit)
from c8dbde2a28d518a59867d116ebf93ed4a8704a1e (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=eaaf5aab1a9c286a3d7470880e0c1590fd6bb9a7
commit eaaf5aab1a9c286a3d7470880e0c1590fd6bb9a7
Merge: c8dbde2 fa889c4
Author: Stephen Kelly <steveire at gmail.com>
AuthorDate: Sun Jan 18 12:24:32 2015 -0500
Commit: CMake Topic Stage <kwrobot at kitware.com>
CommitDate: Sun Jan 18 12:24:32 2015 -0500
Merge topic 'use-member-insert' into next
fa889c4d cmakemain: Initialize vector content with iterators directly.
8211010c cmakemain: Use member insert in command line handling code.
http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=fa889c4d2f49ed4b3edc8e7820b4d9bbfeeeb2a3
commit fa889c4d2f49ed4b3edc8e7820b4d9bbfeeeb2a3
Author: Stephen Kelly <steveire at gmail.com>
AuthorDate: Sun Jan 18 18:18:54 2015 +0100
Commit: Stephen Kelly <steveire at gmail.com>
CommitDate: Sun Jan 18 18:24:04 2015 +0100
cmakemain: Initialize vector content with iterators directly.
diff --git a/Source/cmakemain.cxx b/Source/cmakemain.cxx
index 83ba72f..9e84e68 100644
--- a/Source/cmakemain.cxx
+++ b/Source/cmakemain.cxx
@@ -219,11 +219,7 @@ int do_cmake(int ac, char const* const* av)
// the command line args are processed here so that you can do
// -DCMAKE_MODULE_PATH=/some/path and have this value accessible here
- std::vector<std::string> args;
- for(int i =0; i < ac; ++i)
- {
- args.push_back(av[i]);
- }
+ std::vector<std::string> args(av, av + ac);
hcm.SetCacheArgs(args);
std::vector<cmDocumentationEntry> generators;
http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=8211010c3f0d262cd7d300856f34a3af01f766b3
commit 8211010c3f0d262cd7d300856f34a3af01f766b3
Author: Stephen Kelly <steveire at gmail.com>
AuthorDate: Sun Jan 18 18:05:28 2015 +0100
Commit: Stephen Kelly <steveire at gmail.com>
CommitDate: Sun Jan 18 18:18:43 2015 +0100
cmakemain: Use member insert in command line handling code.
diff --git a/Source/cmakemain.cxx b/Source/cmakemain.cxx
index 61b175e..83ba72f 100644
--- a/Source/cmakemain.cxx
+++ b/Source/cmakemain.cxx
@@ -96,11 +96,9 @@ static const char * cmDocumentationOptions[][2] =
static int do_command(int ac, char const* const* av)
{
std::vector<std::string> args;
+ args.reserve(ac - 1);
args.push_back(av[0]);
- for(int i = 2; i < ac; ++i)
- {
- args.push_back(av[i]);
- }
+ args.insert(args.end(), av + 2, av + ac);
return cmcmd::ExecuteCMakeCommand(args);
}
-----------------------------------------------------------------------
Summary of changes:
Source/cmakemain.cxx | 12 +++---------
1 file changed, 3 insertions(+), 9 deletions(-)
hooks/post-receive
--
CMake
More information about the Cmake-commits
mailing list