From c9443c01208377f0cba9706412ea3a98ad97b56d Mon Sep 17 00:00:00 2001 From: David Kalnischkies Date: Mon, 20 Jul 2015 10:17:29 +0200 Subject: elimate duplicated code in pkgIndexFile subclasses Trade deduplication of code for a bunch of new virtuals, so it is actually visible how the different indexes behave cleaning up the interface at large in the process. Git-Dch: Ignore --- apt-pkg/deb/deblistparser.cc | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'apt-pkg/deb/deblistparser.cc') diff --git a/apt-pkg/deb/deblistparser.cc b/apt-pkg/deb/deblistparser.cc index b7988d499..cb2b15668 100644 --- a/apt-pkg/deb/deblistparser.cc +++ b/apt-pkg/deb/deblistparser.cc @@ -50,8 +50,9 @@ static debListParser::WordList PrioList[] = { /* Provide an architecture and only this one and "all" will be accepted in Step(), if no Architecture is given we will accept every arch we would accept in general with checkArchitecture() */ -debListParser::debListParser(FileFd *File, string const &Arch) : d(NULL), Tags(File), - Arch(Arch) { +debListParser::debListParser(FileFd *File, string const &Arch) : + pkgCacheListParser(), d(NULL), Tags(File), Arch(Arch) +{ if (Arch == "native") this->Arch = _config->Find("APT::Architecture"); Architectures = APT::Configuration::getArchitectures(); @@ -931,7 +932,7 @@ unsigned char debListParser::GetPrio(string Str) bool debListParser::SameVersion(unsigned short const Hash, /*{{{*/ pkgCache::VerIterator const &Ver) { - if (pkgCacheGenerator::ListParser::SameVersion(Hash, Ver) == false) + if (pkgCacheListParser::SameVersion(Hash, Ver) == false) return false; // status file has no (Download)Size, but all others are fair game // status file is parsed last, so the first version we encounter is -- cgit v1.2.3