diff options
author | Stephen Kelly <steveire@gmail.com> | 2015-01-15 01:59:09 (GMT) |
---|---|---|
committer | Stephen Kelly <steveire@gmail.com> | 2015-01-18 14:15:17 (GMT) |
commit | b54225732f6b46c8f2ab0b2dd76ffa04d173b2f0 (patch) | |
tree | 813c76b180311a35bda38b2c87626acba76acd4f | |
parent | 92a37f92791f801d378b49fd86f097391facd02e (diff) | |
download | CMake-b54225732f6b46c8f2ab0b2dd76ffa04d173b2f0.zip CMake-b54225732f6b46c8f2ab0b2dd76ffa04d173b2f0.tar.gz CMake-b54225732f6b46c8f2ab0b2dd76ffa04d173b2f0.tar.bz2 |
cmListCommand: Replace loop with member algorithm.
-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()); |