X-Git-Url: https://git.saurik.com/apt.git/blobdiff_plain/f7132d28980564b0dd75aff1e27f4b02407fa5cc..5e972bffae68a75aafc9f9b639e82e252fde3b8b:/apt-pkg/pkgrecords.cc diff --git a/apt-pkg/pkgrecords.cc b/apt-pkg/pkgrecords.cc index f62f945b5..9c2655d6a 100644 --- a/apt-pkg/pkgrecords.cc +++ b/apt-pkg/pkgrecords.cc @@ -42,9 +42,6 @@ pkgRecords::pkgRecords(pkgCache &Cache) : Cache(Cache), Files(0) if (Files[I->ID] == 0) return; } - // We store that to make sure that the destructor won't segfault, - // even if the Cache object was destructed before this instance. - PackageFileCount = Cache.HeaderP->PackageFileCount; } /*}}}*/ // Records::~pkgRecords - Destructor /*{{{*/ @@ -52,7 +49,7 @@ pkgRecords::pkgRecords(pkgCache &Cache) : Cache(Cache), Files(0) /* */ pkgRecords::~pkgRecords() { - for (unsigned I = 0; I != PackageFileCount; I++) + for (unsigned I = 0; I != Cache.HeaderP->PackageFileCount; I++) delete Files[I]; delete [] Files; } @@ -66,12 +63,3 @@ pkgRecords::Parser &pkgRecords::Lookup(pkgCache::VerFileIterator const &Ver) return *Files[Ver.File()->ID]; } /*}}}*/ -// Records::Lookup - Get a parser for the package description file /*{{{*/ -// --------------------------------------------------------------------- -/* */ -pkgRecords::Parser &pkgRecords::Lookup(pkgCache::DescFileIterator const &Desc) -{ - Files[Desc.File()->ID]->Jump(Desc); - return *Files[Desc.File()->ID]; -} - /*}}}*/