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

View File

@@ -466,7 +466,7 @@ bool cmFindPackageCommand::InitialPass(std::vector<std::string> const& args,
// Allocate a PACKAGE_ROOT_PATH for the current find_package call.
this->Makefile->FindPackageRootPathStack.emplace_back();
std::vector<std::string>& rootPaths =
*this->Makefile->FindPackageRootPathStack.rbegin();
this->Makefile->FindPackageRootPathStack.back();
// Add root paths from <PackageName>_ROOT CMake and environment variables,
// subject to CMP0074.