diff options
author | Brad King <brad.king@kitware.com> | 2015-01-19 14:43:27 (GMT) |
---|---|---|
committer | CMake Topic Stage <kwrobot@kitware.com> | 2015-01-19 14:43:27 (GMT) |
commit | a6bbbd0f4a9ca9d683000f3302842bc25615e57a (patch) | |
tree | 208264c5b8244efcc6a8e15c39774ef46e5971ad /Source/cmListCommand.cxx | |
parent | 95d42840e88599ab1959f7531668e320a7c20fdf (diff) | |
parent | fa889c4d2f49ed4b3edc8e7820b4d9bbfeeeb2a3 (diff) | |
download | CMake-a6bbbd0f4a9ca9d683000f3302842bc25615e57a.zip CMake-a6bbbd0f4a9ca9d683000f3302842bc25615e57a.tar.gz CMake-a6bbbd0f4a9ca9d683000f3302842bc25615e57a.tar.bz2 |
Merge topic 'use-member-insert'
fa889c4d cmakemain: Initialize vector content with iterators directly.
8211010c cmakemain: Use member insert in command line handling code.
b5422573 cmListCommand: Replace loop with member algorithm.
92a37f92 Convert raw loops to set member insert.
aac44e71 Convert raw loops to vector member insert.
Diffstat (limited to 'Source/cmListCommand.cxx')
-rw-r--r-- | Source/cmListCommand.cxx | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/Source/cmListCommand.cxx b/Source/cmListCommand.cxx index c3f0f57..5a0eee3 100644 --- a/Source/cmListCommand.cxx +++ b/Source/cmListCommand.cxx @@ -345,13 +345,9 @@ bool cmListCommand::HandleInsertCommand(std::vector<std::string> const& args) return false; } } - size_t cc; - size_t cnt = 0; - for ( cc = 3; cc < args.size(); ++ cc ) - { - varArgsExpanded.insert(varArgsExpanded.begin()+item+cnt, args[cc]); - cnt ++; - } + + varArgsExpanded.insert(varArgsExpanded.begin()+item, + args.begin() + 3, args.end()); std::string value = cmJoin(varArgsExpanded, ";"); this->Makefile->AddDefinition(listName, value.c_str()); |