summaryrefslogtreecommitdiff
path: root/apt-pkg/cachefilter-patterns.h
diff options
context:
space:
mode:
authorJulian Andres Klode <jak@debian.org>2025-01-14 08:26:23 +0000
committerJulian Andres Klode <jak@debian.org>2025-01-14 08:26:23 +0000
commitce452d40f499fa56f6ddc15e8871b1262d4e1418 (patch)
treecca88ab8b56520eec386921aa51906d7bdf4f385 /apt-pkg/cachefilter-patterns.h
parentf9a59225c3b1e025ad93116773cc7825621809c8 (diff)
parentaa4c681f09f06359c0892329b9e39da77e4f9fda (diff)
Merge branch 'fix/cleanup' into 'main'
Drop unused and obsolete macros as well as documentation See merge request apt-team/apt!428
Diffstat (limited to 'apt-pkg/cachefilter-patterns.h')
-rw-r--r--apt-pkg/cachefilter-patterns.h7
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);
}
};