diff options
Diffstat (limited to 'Source/CTest/cmCTestHandlerCommand.cxx')
-rw-r--r-- | Source/CTest/cmCTestHandlerCommand.cxx | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/Source/CTest/cmCTestHandlerCommand.cxx b/Source/CTest/cmCTestHandlerCommand.cxx index 9266d1f..5a7baf5 100644 --- a/Source/CTest/cmCTestHandlerCommand.cxx +++ b/Source/CTest/cmCTestHandlerCommand.cxx @@ -97,12 +97,11 @@ bool cmCTestHandlerCommand::InitialPass(std::vector<std::string> const& args, // bad one so that CAPTURE_CMAKE_ERROR can override setting the // global error state bool foundBadArgument = false; - for (unsigned int i = 0; i < args.size(); ++i) { + for (std::string const& arg : args) { // Check this argument. - if (!this->CheckArgumentKeyword(args[i]) && - !this->CheckArgumentValue(args[i])) { + if (!this->CheckArgumentKeyword(arg) && !this->CheckArgumentValue(arg)) { std::ostringstream e; - e << "called with unknown argument \"" << args[i] << "\"."; + e << "called with unknown argument \"" << arg << "\"."; this->SetError(e.str()); foundBadArgument = true; } |