diff options
Diffstat (limited to 'Source/cmFindPackageCommand.cxx')
-rw-r--r-- | Source/cmFindPackageCommand.cxx | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/Source/cmFindPackageCommand.cxx b/Source/cmFindPackageCommand.cxx index c2e0712..45b096f 100644 --- a/Source/cmFindPackageCommand.cxx +++ b/Source/cmFindPackageCommand.cxx @@ -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. @@ -827,10 +827,10 @@ bool cmFindPackageCommand::HandlePackageMode() << " requested version \"" << this->Version << "\".\n" << "The following configuration files were considered but not " "accepted:\n"; - for (std::vector<ConfigFileInfo>::const_iterator i = - this->ConsideredConfigs.begin(); - i != duplicate_end; ++i) { - e << " " << i->filename << ", version: " << i->version << "\n"; + + for (ConfigFileInfo const& info : + cmMakeRange(this->ConsideredConfigs.cbegin(), duplicate_end)) { + e << " " << info.filename << ", version: " << info.version << "\n"; } } else { std::string requestedVersionString; @@ -911,7 +911,7 @@ bool cmFindPackageCommand::HandlePackageMode() std::ostringstream aw; aw << "Could NOT find " << this->Name << " (missing: " << this->Name << "_DIR)"; - this->Makefile->DisplayStatus(aw.str().c_str(), -1); + this->Makefile->DisplayStatus(aw.str(), -1); } } |