diff options
Diffstat (limited to 'Source/CTest/cmCTestCVS.cxx')
-rw-r--r-- | Source/CTest/cmCTestCVS.cxx | 21 |
1 files changed, 9 insertions, 12 deletions
diff --git a/Source/CTest/cmCTestCVS.cxx b/Source/CTest/cmCTestCVS.cxx index f2a9a85..6eeb135 100644 --- a/Source/CTest/cmCTestCVS.cxx +++ b/Source/CTest/cmCTestCVS.cxx @@ -92,9 +92,8 @@ bool cmCTestCVS::UpdateImpl() cvs_update.push_back(this->CommandLineTool.c_str()); cvs_update.push_back("-z3"); cvs_update.push_back("update"); - for (std::vector<std::string>::const_iterator ai = args.begin(); - ai != args.end(); ++ai) { - cvs_update.push_back(ai->c_str()); + for (std::string const& arg : args) { + cvs_update.push_back(arg.c_str()); } cvs_update.push_back(nullptr); @@ -242,12 +241,12 @@ void cmCTestCVS::WriteXMLDirectory(cmXMLWriter& xml, std::string const& path, // Load revisions and write an entry for each file in this directory. std::vector<Revision> revisions; - for (Directory::const_iterator fi = dir.begin(); fi != dir.end(); ++fi) { - std::string full = path + slash + fi->first; + for (auto const& fi : dir) { + std::string full = path + slash + fi.first; // Load two real or unknown revisions. revisions.clear(); - if (fi->second != PathUpdated) { + if (fi.second != PathUpdated) { // For local modifications the current rev is unknown and the // prior rev is the latest from cvs. revisions.push_back(this->Unknown); @@ -256,8 +255,8 @@ void cmCTestCVS::WriteXMLDirectory(cmXMLWriter& xml, std::string const& path, revisions.resize(2, this->Unknown); // Write the entry for this file with these revisions. - File f(fi->second, &revisions[0], &revisions[1]); - this->WriteXMLEntry(xml, path, fi->first, full, f); + File f(fi.second, &revisions[0], &revisions[1]); + this->WriteXMLEntry(xml, path, fi.first, full, f); } xml.EndElement(); // Directory } @@ -269,10 +268,8 @@ bool cmCTestCVS::WriteXMLUpdates(cmXMLWriter& xml) " " << std::flush); - for (std::map<std::string, Directory>::const_iterator di = - this->Dirs.begin(); - di != this->Dirs.end(); ++di) { - this->WriteXMLDirectory(xml, di->first, di->second); + for (auto const& d : this->Dirs) { + this->WriteXMLDirectory(xml, d.first, d.second); } cmCTestLog(this->CTest, HANDLER_OUTPUT, std::endl); |