class PackageNameMatcher : public Matcher
{
public:
- PackageNameMatcher(const char **patterns)
+ explicit PackageNameMatcher(const char **patterns)
{
for(int i=0; patterns[i] != NULL; ++i)
{
for(J=filters.begin(); J != filters.end(); ++J)
delete *J;
}
- virtual bool operator () (const pkgCache::PkgIterator &P)
+ virtual bool operator () (const pkgCache::PkgIterator &P) APT_OVERRIDE
{
for(J=filters.begin(); J != filters.end(); ++J)
{
bool DoList(CommandLine &Cmd)
{
pkgCacheFile CacheFile;
- pkgCache *Cache = CacheFile.GetPkgCache();
- if (unlikely(Cache == NULL))
+ pkgCache * const Cache = CacheFile.GetPkgCache();
+ if (unlikely(Cache == nullptr || CacheFile.GetDepCache() == nullptr))
return false;
pkgRecords records(CacheFile);