diff --git a/Source/cmComputeLinkDepends.cxx b/Source/cmComputeLinkDepends.cxx index 1fb8f30f4..a636d23c7 100644 --- a/Source/cmComputeLinkDepends.cxx +++ b/Source/cmComputeLinkDepends.cxx @@ -266,9 +266,10 @@ cmComputeLinkDepends::Compute() // Iterate in reverse order so we can keep only the last occurrence // of a shared library. std::set emmitted; + const std::vector& cFLO = this->FinalLinkOrder; for(std::vector::const_reverse_iterator - li = this->FinalLinkOrder.rbegin(), - le = this->FinalLinkOrder.rend(); + li = cFLO.rbegin(), + le = cFLO.rend(); li != le; ++li) { int i = *li; diff --git a/Source/cmFindPackageCommand.cxx b/Source/cmFindPackageCommand.cxx index 0130006b7..8410cda80 100644 --- a/Source/cmFindPackageCommand.cxx +++ b/Source/cmFindPackageCommand.cxx @@ -80,12 +80,15 @@ void cmFindPackageCommand::AppendSearchPathGroups() PathLabel::SystemRegistry); // Create the new path objects - this->LabeledPaths.insert(std::make_pair(PathLabel::UserRegistry, - cmSearchPath(this))); - this->LabeledPaths.insert(std::make_pair(PathLabel::Builds, - cmSearchPath(this))); - this->LabeledPaths.insert(std::make_pair(PathLabel::SystemRegistry, - cmSearchPath(this))); + this->LabeledPaths.insert( + std::pair( + PathLabel::UserRegistry, cmSearchPath(this))); + this->LabeledPaths.insert( + std::pair( + PathLabel::Builds, cmSearchPath(this))); + this->LabeledPaths.insert( + std::pair( + PathLabel::SystemRegistry, cmSearchPath(this))); } //----------------------------------------------------------------------------