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/cmCTestUploadHandler.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/cmCTestUploadHandler.cxx')
-rw-r--r-- | Source/CTest/cmCTestUploadHandler.cxx | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/Source/CTest/cmCTestUploadHandler.cxx b/Source/CTest/cmCTestUploadHandler.cxx index 05a3984..59a5de4 100644 --- a/Source/CTest/cmCTestUploadHandler.cxx +++ b/Source/CTest/cmCTestUploadHandler.cxx @@ -7,7 +7,6 @@ #include "cmXMLWriter.h" #include <ostream> -#include <set> #include <string> cmCTestUploadHandler::cmCTestUploadHandler() @@ -37,7 +36,6 @@ int cmCTestUploadHandler::ProcessHandler() } std::string buildname = cmCTest::SafeBuildIdField(this->CTest->GetCTestConfiguration("BuildName")); - cmCTest::SetOfStrings::const_iterator it; cmXMLWriter xml(ofs); xml.StartDocument(); @@ -55,14 +53,14 @@ int cmCTestUploadHandler::ProcessHandler() this->CTest->AddSiteProperties(xml); xml.StartElement("Upload"); - for (it = this->Files.begin(); it != this->Files.end(); it++) { + for (std::string const& file : this->Files) { cmCTestOptionalLog(this->CTest, OUTPUT, - "\tUpload file: " << *it << std::endl, this->Quiet); + "\tUpload file: " << file << std::endl, this->Quiet); xml.StartElement("File"); - xml.Attribute("filename", *it); + xml.Attribute("filename", file); xml.StartElement("Content"); xml.Attribute("encoding", "base64"); - xml.Content(this->CTest->Base64EncodeFile(*it)); + xml.Content(this->CTest->Base64EncodeFile(file)); xml.EndElement(); // Content xml.EndElement(); // File } |