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/cachefilter-patterns.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/cachefilter-patterns.h')
| -rw-r--r-- | apt-pkg/cachefilter-patterns.h | 7 |
1 files changed, 1 insertions, 6 deletions
diff --git a/apt-pkg/cachefilter-patterns.h b/apt-pkg/cachefilter-patterns.h index 75784e040..1714bbb62 100644 --- a/apt-pkg/cachefilter-patterns.h +++ b/apt-pkg/cachefilter-patterns.h @@ -475,12 +475,7 @@ struct APT_HIDDEN VersionIsPriority : public VersionAnyMatcher explicit VersionIsPriority(std::string name) : name(name) {} bool operator()(pkgCache::VerIterator const &Ver) override { - std::string Mapping[] = {"", "required","important","standard", - "optional","extra"}; - if (Ver->Priority > 0 && Ver->Priority < APT_ARRAY_SIZE(Mapping)) { - return name == Mapping[Ver->Priority]; - } - return false; + return Ver->Priority > 0 && name == pkgCache::Priority_NoL10n(Ver->Priority); } }; |
