summaryrefslogtreecommitdiff
path: root/apt-pkg/solver3.h
diff options
context:
space:
mode:
Diffstat (limited to 'apt-pkg/solver3.h')
-rw-r--r--apt-pkg/solver3.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/apt-pkg/solver3.h b/apt-pkg/solver3.h
index fc2e90b7f..4390d589b 100644
--- a/apt-pkg/solver3.h
+++ b/apt-pkg/solver3.h
@@ -461,12 +461,12 @@ class DependencySolver final : public Solver
}
// GetCandidateVer() with caching
- mutable ContiguousCacheMap<pkgCache::Package, pkgCache::VerIterator> candidates;
+ mutable FastContiguousCacheMap<pkgCache::Package, pkgCache::Version *> candidates;
pkgCache::VerIterator GetCandidateVer(pkgCache::PkgIterator pkg) const
{
- if (candidates[pkg].end())
+ if (candidates[pkg] == 0)
candidates[pkg] = policy.GetCandidateVer(pkg);
- return candidates[pkg];
+ return pkgCache::VerIterator(cache, candidates[pkg]);
}
// \brief Discover variables