From 472376be6818b5ea43250abcbecfcab53b4a729a Mon Sep 17 00:00:00 2001 From: David Kalnischkies Date: Fri, 1 Apr 2022 13:45:09 +0200 Subject: Use pkgTagSection::Key in more places in src:apt The speed critical paths were converted earlier, but the remaining could benefit a tiny bit from this as well especially as we have the facility now available and can therefore brush up the code in various places in the process as well. Also takes the time to add the hidden Exists method advertised in the headers, but previously not implemented. --- apt-pkg/edsp/edsplistparser.cc | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'apt-pkg/edsp/edsplistparser.cc') diff --git a/apt-pkg/edsp/edsplistparser.cc b/apt-pkg/edsp/edsplistparser.cc index 0be543e3c..5419069f2 100644 --- a/apt-pkg/edsp/edsplistparser.cc +++ b/apt-pkg/edsp/edsplistparser.cc @@ -19,6 +19,7 @@ #include #include #include +#include #include #include @@ -141,8 +142,8 @@ bool eippListParser::ParseStatus(pkgCache::PkgIterator &Pkg, {"triggers-pending",pkgCache::State::TriggersPending}, {"installed",pkgCache::State::Installed}, }}; - auto const status = Section.Find("Status"); - if (status.empty() == false) + auto const status = Section.Find(pkgTagSection::Key::Status); + if (not status.empty()) { for (auto && sv: statusvalues) { -- cgit v1.2.3-70-g09d2