Prefer front/back/data over dereferencing begin/rbegin iter

Changed for sequenced containers: vector, list, string and array
This commit is contained in:
Artur Ryt
2019-02-04 22:56:42 +01:00
committed by Brad King
parent 062cfd991f
commit f3534386b5
22 changed files with 64 additions and 65 deletions
+3 -3
View File
@@ -3067,7 +3067,7 @@ bool cmFileCommand::HandleDownloadCommand(std::vector<std::string> const& args)
if (!logVar.empty()) {
chunkDebug.push_back(0);
this->Makefile->AddDefinition(logVar, &*chunkDebug.begin());
this->Makefile->AddDefinition(logVar, chunkDebug.data());
}
return true;
@@ -3326,14 +3326,14 @@ bool cmFileCommand::HandleUploadCommand(std::vector<std::string> const& args)
if (!chunkResponse.empty()) {
chunkResponse.push_back(0);
log += "Response:\n";
log += &*chunkResponse.begin();
log += chunkResponse.data();
log += "\n";
}
if (!chunkDebug.empty()) {
chunkDebug.push_back(0);
log += "Debug:\n";
log += &*chunkDebug.begin();
log += chunkDebug.data();
log += "\n";
}