summaryrefslogtreecommitdiffstats
path: root/Source/CTest/cmParseMumpsCoverage.cxx
diff options
context:
space:
mode:
authorPavel Solodovnikov <hellyeahdominate@gmail.com>2017-09-14 13:11:58 (GMT)
committerPavel Solodovnikov <hellyeahdominate@gmail.com>2017-09-14 13:11:58 (GMT)
commit63f6fd144ef0171864ddeccee6618ab179e90384 (patch)
tree36c602ec8b47cef4b0b72929958c5c19846ffb1e /Source/CTest/cmParseMumpsCoverage.cxx
parent420874bfaa20772525c60b20d1ee5b6ef5ed9298 (diff)
downloadCMake-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/cmParseMumpsCoverage.cxx')
-rw-r--r--Source/CTest/cmParseMumpsCoverage.cxx11
1 files changed, 4 insertions, 7 deletions
diff --git a/Source/CTest/cmParseMumpsCoverage.cxx b/Source/CTest/cmParseMumpsCoverage.cxx
index 8cb1170..1419743 100644
--- a/Source/CTest/cmParseMumpsCoverage.cxx
+++ b/Source/CTest/cmParseMumpsCoverage.cxx
@@ -9,7 +9,6 @@
#include <map>
#include <string>
#include <utility>
-#include <vector>
cmParseMumpsCoverage::cmParseMumpsCoverage(
cmCTestCoverageHandlerContainer& cont, cmCTest* ctest)
@@ -112,14 +111,12 @@ bool cmParseMumpsCoverage::LoadPackages(const char* d)
std::string pat = d;
pat += "/*.m";
glob.FindFiles(pat);
- std::vector<std::string>& files = glob.GetFiles();
- std::vector<std::string>::iterator fileIt;
- for (fileIt = files.begin(); fileIt != files.end(); ++fileIt) {
- std::string name = cmSystemTools::GetFilenameName(*fileIt);
- this->RoutineToDirectory[name.substr(0, name.size() - 2)] = *fileIt;
+ for (std::string& file : glob.GetFiles()) {
+ std::string name = cmSystemTools::GetFilenameName(file);
+ this->RoutineToDirectory[name.substr(0, name.size() - 2)] = file;
// initialze each file, this is left out until CDash is fixed
// to handle large numbers of files
- this->InitializeMumpsFile(*fileIt);
+ this->InitializeMumpsFile(file);
}
return true;
}