diff options
author | Pavel Solodovnikov <hellyeahdominate@gmail.com> | 2017-09-14 13:11:58 (GMT) |
---|---|---|
committer | Pavel Solodovnikov <hellyeahdominate@gmail.com> | 2017-09-14 13:11:58 (GMT) |
commit | 63f6fd144ef0171864ddeccee6618ab179e90384 (patch) | |
tree | 36c602ec8b47cef4b0b72929958c5c19846ffb1e /Source/CTest/cmParseBlanketJSCoverage.cxx | |
parent | 420874bfaa20772525c60b20d1ee5b6ef5ed9298 (diff) | |
download | CMake-63f6fd144ef0171864ddeccee6618ab179e90384.zip CMake-63f6fd144ef0171864ddeccee6618ab179e90384.tar.gz CMake-63f6fd144ef0171864ddeccee6618ab179e90384.tar.bz2 |
Meta: modernize old-fashioned loops to range-based `for` (CTest).
Changes done via `clang-tidy` with some manual fine-tuning
for the variable naming and `auto` type deduction
where appropriate.
Diffstat (limited to 'Source/CTest/cmParseBlanketJSCoverage.cxx')
-rw-r--r-- | Source/CTest/cmParseBlanketJSCoverage.cxx | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/Source/CTest/cmParseBlanketJSCoverage.cxx b/Source/CTest/cmParseBlanketJSCoverage.cxx index 83a7b75..308e6f7 100644 --- a/Source/CTest/cmParseBlanketJSCoverage.cxx +++ b/Source/CTest/cmParseBlanketJSCoverage.cxx @@ -112,17 +112,15 @@ cmParseBlanketJSCoverage::cmParseBlanketJSCoverage( bool cmParseBlanketJSCoverage::LoadCoverageData(std::vector<std::string> files) { - size_t i = 0; - std::string path; cmCTestOptionalLog(this->CTest, HANDLER_VERBOSE_OUTPUT, "Found " << files.size() << " Files" << std::endl, this->Coverage.Quiet); - for (i = 0; i < files.size(); i++) { + for (std::string const& file : files) { cmCTestOptionalLog(this->CTest, HANDLER_VERBOSE_OUTPUT, - "Reading JSON File " << files[i] << std::endl, + "Reading JSON File " << file << std::endl, this->Coverage.Quiet); - if (!this->ReadJSONFile(files[i])) { + if (!this->ReadJSONFile(file)) { return false; } } |