mirror of
https://github.com/Kitware/CMake.git
synced 2026-02-22 06:59:01 -06:00
Use insert instead of a loop in some cases.
Limit this change to inserting into a vector from a vector. A follow up change can use insert for inserting into a set.
This commit is contained in:
@@ -36,11 +36,7 @@ bool cmAddTestCommand
|
||||
|
||||
// Collect the command with arguments.
|
||||
std::vector<std::string> command;
|
||||
for(std::vector<std::string>::const_iterator it = args.begin() + 1;
|
||||
it != args.end(); ++it)
|
||||
{
|
||||
command.push_back(*it);
|
||||
}
|
||||
command.insert(command.end(), args.begin() + 1, args.end());
|
||||
|
||||
// Create the test but add a generator only the first time it is
|
||||
// seen. This preserves behavior from before test generators.
|
||||
|
||||
Reference in New Issue
Block a user