From 6828ae2c2f9268c8187f0fa91b3c464ed84a8476 Mon Sep 17 00:00:00 2001 From: David Kalnischkies Date: Thu, 26 Dec 2024 20:43:34 +0000 Subject: 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. --- apt-pkg/pkgcache.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'apt-pkg/pkgcache.h') 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(); -- cgit v1.2.3-70-g09d2