Browse Source

Annotate more methods with APT_OVERRIDE

Gbp-Dch: ignore
Reported-By: g++ -Wsuggest-override
Thanks: g++ -Wsuggest-override
debian/1.8.y
Julian Andres Klode 7 years ago
parent
commit
6d7122b535
  1. 2
      apt-pkg/cachefilter.h
  2. 2
      apt-pkg/contrib/sha2.h
  3. 18
      apt-pkg/deb/debindexfile.h
  4. 4
      apt-pkg/deb/debversion.h
  5. 2
      apt-pkg/edsp/edspindexfile.h
  6. 2
      apt-private/private-list.cc

2
apt-pkg/cachefilter.h

@ -29,7 +29,7 @@ public:
class PackageMatcher : public Matcher {
public:
virtual bool operator() (pkgCache::PkgIterator const &Pkg) = 0;
virtual bool operator() (pkgCache::PkgIterator const &Pkg) APT_OVERRIDE = 0;
virtual bool operator() (pkgCache::VerIterator const &Ver) APT_OVERRIDE { return (*this)(Ver.ParentPkg()); }
virtual bool operator() (pkgCache::GrpIterator const &/*Grp*/) APT_OVERRIDE { return false; }
virtual ~PackageMatcher();

2
apt-pkg/contrib/sha2.h

@ -34,7 +34,7 @@ class SHA2SummationBase : public SummationImplementation
protected:
bool Done;
public:
bool Add(const unsigned char *inbuf, unsigned long long len) = 0;
bool Add(const unsigned char *inbuf, unsigned long long len) APT_OVERRIDE = 0;
void Result();
};

18
apt-pkg/deb/debindexfile.h

@ -36,7 +36,7 @@ protected:
public:
virtual const Type *GetType() const APT_CONST;
virtual const Type *GetType() const APT_OVERRIDE APT_CONST;
// Interface for the Cache Generator
virtual bool HasPackages() const APT_OVERRIDE {return true;};
@ -51,10 +51,10 @@ class debPackagesIndex : public pkgDebianIndexTargetFile
{
void * const d;
protected:
virtual uint8_t GetIndexFlags() const;
virtual uint8_t GetIndexFlags() const APT_OVERRIDE;
public:
virtual const Type *GetType() const APT_CONST;
virtual const Type *GetType() const APT_OVERRIDE APT_CONST;
// Stuff for accessing files on remote items
virtual std::string ArchiveInfo(pkgCache::VerIterator const &Ver) const APT_OVERRIDE;
@ -77,7 +77,7 @@ protected:
public:
virtual const Type *GetType() const APT_CONST;
virtual const Type *GetType() const APT_OVERRIDE APT_CONST;
// Interface for the Cache Generator
virtual bool HasPackages() const APT_OVERRIDE;
@ -89,13 +89,13 @@ public:
class debSourcesIndex : public pkgDebianIndexTargetFile
{
void * const d;
virtual uint8_t GetIndexFlags() const;
virtual uint8_t GetIndexFlags() const APT_OVERRIDE;
virtual bool OpenListFile(FileFd &Pkg, std::string const &FileName) APT_OVERRIDE;
APT_HIDDEN virtual pkgCacheListParser * CreateListParser(FileFd &Pkg) APT_OVERRIDE;
public:
virtual const Type *GetType() const APT_CONST;
virtual const Type *GetType() const APT_OVERRIDE APT_CONST;
// Stuff for accessing files on remote items
virtual std::string SourceInfo(pkgSrcRecords::Parser const &Record,
@ -124,7 +124,7 @@ protected:
APT_HIDDEN virtual pkgCacheListParser * CreateListParser(FileFd &Pkg) APT_OVERRIDE;
public:
virtual const Type *GetType() const APT_CONST;
virtual const Type *GetType() const APT_OVERRIDE APT_CONST;
/** get the control (file) content of the deb file
*
@ -148,7 +148,7 @@ class debDscFileIndex : public pkgDebianIndexRealFile
{
void * const d;
public:
virtual const Type *GetType() const APT_CONST;
virtual const Type *GetType() const APT_OVERRIDE APT_CONST;
virtual pkgSrcRecords::Parser *CreateSrcParser() const APT_OVERRIDE;
virtual bool HasPackages() const APT_OVERRIDE {return false;};
@ -159,7 +159,7 @@ class debDscFileIndex : public pkgDebianIndexRealFile
class debDebianSourceDirIndex : public debDscFileIndex
{
public:
virtual const Type *GetType() const APT_CONST;
virtual const Type *GetType() const APT_OVERRIDE APT_CONST;
};
#endif

4
apt-pkg/deb/debversion.h

@ -24,8 +24,8 @@ class debVersioningSystem : public pkgVersioningSystem
// Compare versions..
virtual int DoCmpVersion(const char *A,const char *Aend,
const char *B,const char *Bend) APT_PURE;
virtual bool CheckDep(const char *PkgVer,int Op,const char *DepVer) APT_PURE;
const char *B,const char *Bend) APT_OVERRIDE APT_PURE;
virtual bool CheckDep(const char *PkgVer,int Op,const char *DepVer) APT_OVERRIDE APT_PURE;
virtual APT_PURE int DoCmpReleaseVer(const char *A,const char *Aend,
const char *B,const char *Bend) APT_OVERRIDE
{

2
apt-pkg/edsp/edspindexfile.h

@ -31,7 +31,7 @@ protected:
virtual std::string GetArchitecture() const APT_OVERRIDE;
public:
virtual const Type *GetType() const APT_CONST;
virtual const Type *GetType() const APT_OVERRIDE APT_CONST;
virtual bool Exists() const APT_OVERRIDE;
virtual bool HasPackages() const APT_OVERRIDE;

2
apt-private/private-list.cc

@ -59,7 +59,7 @@ class PackageNameMatcher : public Matcher
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)
{

Loading…
Cancel
Save