diff options
Diffstat (limited to 'Source/cmFindBase.cxx')
-rw-r--r-- | Source/cmFindBase.cxx | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/Source/cmFindBase.cxx b/Source/cmFindBase.cxx index 425546a..f92f66e 100644 --- a/Source/cmFindBase.cxx +++ b/Source/cmFindBase.cxx @@ -4,7 +4,6 @@ #include <deque> #include <iostream> -#include <iterator> #include <map> #include <stddef.h> @@ -205,11 +204,9 @@ void cmFindBase::FillPackageRootPath() cmSearchPath& paths = this->LabeledPaths[PathLabel::PackageRoot]; // Add the PACKAGE_ROOT_PATH from each enclosing find_package call. - for (std::deque<std::vector<std::string>>::const_reverse_iterator pkgPaths = - this->Makefile->FindPackageRootPathStack.rbegin(); - pkgPaths != this->Makefile->FindPackageRootPathStack.rend(); - ++pkgPaths) { - paths.AddPrefixPaths(*pkgPaths); + for (std::vector<std::string> const& pkgPaths : + cmReverseRange(this->Makefile->FindPackageRootPathStack)) { + paths.AddPrefixPaths(pkgPaths); } paths.AddSuffixes(this->SearchPathSuffixes); |