diff options
Diffstat (limited to '')
-rw-r--r-- | apt-pkg/solver3.h | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/apt-pkg/solver3.h b/apt-pkg/solver3.h index d460c95..96faaa6 100644 --- a/apt-pkg/solver3.h +++ b/apt-pkg/solver3.h @@ -219,6 +219,16 @@ struct APT::Solver::Reason { return IsVersion ? map_pointer<pkgCache::Version>{(uint32_t)MapPtr} : 0; } + // \brief Return the package iterator if storing a package, or an empty one + pkgCache::PkgIterator Pkg(pkgCache &cache) const + { + return IsVersion ? pkgCache::PkgIterator() : pkgCache::PkgIterator(cache, cache.PkgP + Pkg()); + } + // \brief Return the version iterator if storing a package, or an empty end. + pkgCache::VerIterator Ver(pkgCache &cache) const + { + return IsVersion ? pkgCache::VerIterator(cache, cache.VerP + Ver()) : pkgCache::VerIterator(); + } // \brief Check if there is no reason. bool empty() const { |