diff options
author | David Kalnischkies <david@kalnischkies.de> | 2016-04-28 09:22:55 +0200 |
---|---|---|
committer | David Kalnischkies <david@kalnischkies.de> | 2016-04-28 10:08:32 +0200 |
commit | 84573326f41dd09b914b8374548e7ee7c93d0439 (patch) | |
tree | 3fc7af54e2322c0803495e3a79f69ab138c8f172 /apt-pkg/depcache.h | |
parent | 29636cc759c6fbb92c6c462c90611eefb67cbbd4 (diff) | |
download | apt-84573326f41dd09b914b8374548e7ee7c93d0439.tar.gz |
factor out Pkg/DepIterator prettyprinters into own header
The old prettyprinters have only access to the struct they pretty print,
which isn't enough usually as we want to know for a package also a bit
of state information like which version is the candidate.
We therefore need to pull the DepCache into context and hence use a
temporary struct which is printed instead of the iterator itself.
Diffstat (limited to 'apt-pkg/depcache.h')
-rw-r--r-- | apt-pkg/depcache.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/apt-pkg/depcache.h b/apt-pkg/depcache.h index 99d0e7a63..03a2cb0a8 100644 --- a/apt-pkg/depcache.h +++ b/apt-pkg/depcache.h @@ -369,6 +369,7 @@ class pkgDepCache : protected pkgCache::Namespace // Accessors inline StateCache &operator [](PkgIterator const &I) {return PkgState[I->ID];}; + inline StateCache &operator [](PkgIterator const &I) const {return PkgState[I->ID];}; inline unsigned char &operator [](DepIterator const &I) {return DepState[I->ID];}; /** \return A function identifying packages in the root set other |