diff options
author | Julian Andres Klode <julian.klode@canonical.com> | 2020-02-24 17:46:10 +0100 |
---|---|---|
committer | Julian Andres Klode <julian.klode@canonical.com> | 2020-02-24 18:29:07 +0100 |
commit | 4fad7262291a8af1415fb9a3693678bd9610f0d6 (patch) | |
tree | 39226545753b5f0910547747fb5c691398c7341a /apt-pkg/pkgcachegen.h | |
parent | 1f4e2ab7462f5e05e452fb8505185895d91651c2 (diff) |
Make map_pointer<T> typesafe
Instead of just using uint32_t, which would allow you to
assign e.g. a map_pointer<Version> to a map_pointer<Package>,
use our own smarter struct that has strict type checking.
We allow creating a map_pointer from a nullptr, and we allow
comparing map_pointer to nullptr, which also deals with comparisons
against 0 which are often used, as 0 will be implictly converted
to nullptr.
Diffstat (limited to 'apt-pkg/pkgcachegen.h')
-rw-r--r-- | apt-pkg/pkgcachegen.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/apt-pkg/pkgcachegen.h b/apt-pkg/pkgcachegen.h index c042625c4..f5b4c80b3 100644 --- a/apt-pkg/pkgcachegen.h +++ b/apt-pkg/pkgcachegen.h @@ -118,7 +118,7 @@ class APT_HIDDEN pkgCacheGenerator /*{{{*/ bool NewFileVer(pkgCache::VerIterator &Ver,ListParser &List); bool NewFileDesc(pkgCache::DescIterator &Desc,ListParser &List); bool NewDepends(pkgCache::PkgIterator &Pkg, pkgCache::VerIterator &Ver, - map_pointer<pkgCache::Version> const Version, uint8_t const Op, + map_stringitem_t const Version, uint8_t const Op, uint8_t const Type, map_pointer<pkgCache::Dependency>* &OldDepLast); bool NewProvides(pkgCache::VerIterator &Ver, pkgCache::PkgIterator &Pkg, map_stringitem_t const ProvidesVersion, uint8_t const Flags); |