diff options
| author | David Kalnischkies <david@kalnischkies.de> | 2024-12-26 20:43:34 +0000 |
|---|---|---|
| committer | David Kalnischkies <david@kalnischkies.de> | 2025-01-05 22:16:08 +0000 |
| commit | 6828ae2c2f9268c8187f0fa91b3c464ed84a8476 (patch) | |
| tree | f873c20a03ce4e5885531666ee45d33126e7ca57 /apt-pkg/pkgcache.h | |
| parent | f73593a4034d9eec0ec4466b8e173d4a4daece1f (diff) | |
Add pkgCache::{Priority,DepType}_NoL10n to avoid duplication
We don't have many places, but lets reduce the amount of duplicating
these short strings, so that we may find all the places we have to
change if that ever happens.
Diffstat (limited to 'apt-pkg/pkgcache.h')
| -rw-r--r-- | apt-pkg/pkgcache.h | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/apt-pkg/pkgcache.h b/apt-pkg/pkgcache.h index 7c16f0dee..476a01514 100644 --- a/apt-pkg/pkgcache.h +++ b/apt-pkg/pkgcache.h @@ -245,7 +245,8 @@ class APT_PUBLIC pkgCache /*{{{*/ // Useful transformation things static const char *Priority(unsigned char Priority); - + static std::string_view Priority_NoL10n(unsigned char Prio); + // Accessors GrpIterator FindGrp(APT::StringView Name); PkgIterator FindPkg(APT::StringView Name); @@ -278,6 +279,7 @@ class APT_PUBLIC pkgCache /*{{{*/ static const char *CompTypeDeb(unsigned char Comp) APT_PURE; static const char *CompType(unsigned char Comp) APT_PURE; static const char *DepType(unsigned char Dep); + static std::string_view DepType_NoL10n(unsigned char Dep); pkgCache(MMap *Map,bool DoMap = true); virtual ~pkgCache(); |
