Browse Source

add c++11 override marker to overridden methods

C++11 adds the 'override' specifier to mark that a method is overriding
a base class method and error out if not. We hide it in the APT_OVERRIDE
macro to ensure that we keep compiling in pre-c++11 standards.

Reported-By: clang-modernize -add-override -override-macros
Git-Dch: Ignore
debian/1.8.y
David Kalnischkies 7 years ago
parent
commit
3b3028467c
  1. 6
      apt-inst/deb/debfile.h
  2. 6
      apt-inst/extract.h
  3. 4
      apt-pkg/acquire-item.cc
  4. 140
      apt-pkg/acquire-item.h
  5. 8
      apt-pkg/algorithms.h
  6. 46
      apt-pkg/cachefilter.h
  7. 2
      apt-pkg/contrib/md5.h
  8. 5
      apt-pkg/contrib/progress.h
  9. 2
      apt-pkg/contrib/sha1.h
  10. 4
      apt-pkg/contrib/sha2.h
  11. 10
      apt-pkg/deb/debindexfile.cc
  12. 56
      apt-pkg/deb/debindexfile.h
  13. 34
      apt-pkg/deb/deblistparser.h
  14. 6
      apt-pkg/deb/debmetaindex.cc
  15. 34
      apt-pkg/deb/debmetaindex.h
  16. 32
      apt-pkg/deb/debrecords.h
  17. 24
      apt-pkg/deb/debsrcrecords.h
  18. 16
      apt-pkg/deb/debsystem.h
  19. 4
      apt-pkg/deb/debversion.h
  20. 12
      apt-pkg/deb/dpkgpm.h
  21. 2
      apt-pkg/depcache.h
  22. 2
      apt-pkg/edsp/edspindexfile.cc
  23. 2
      apt-pkg/edsp/edspindexfile.h
  24. 8
      apt-pkg/edsp/edsplistparser.h
  25. 18
      apt-pkg/edsp/edspsystem.h
  26. 16
      apt-pkg/indexcopy.h
  27. 8
      apt-pkg/indexfile.h
  28. 28
      apt-pkg/install-progress.h
  29. 6
      apt-pkg/policy.h
  30. 2
      apt-pkg/tagfile.h
  31. 18
      apt-private/acqprogress.h
  32. 16
      apt-private/private-cacheset.h
  33. 2
      apt-private/private-moo.h
  34. 8
      cmdline/apt-cdrom.cc
  35. 4
      cmdline/apt-extracttemplates.h
  36. 2
      cmdline/apt-get.cc
  37. 2
      ftparchive/contents.h
  38. 8
      ftparchive/writer.h
  39. 4
      methods/cdrom.cc
  40. 2
      methods/copy.cc
  41. 2
      methods/file.cc
  42. 1
      methods/ftp.cc
  43. 6
      methods/ftp.h
  44. 4
      methods/gpgv.cc
  45. 4
      methods/gzip.cc
  46. 34
      methods/http.h
  47. 34
      methods/https.h
  48. 10
      methods/mirror.h
  49. 4
      methods/rred.cc
  50. 4
      methods/rsh.h
  51. 4
      methods/server.h
  52. 2
      test/interactive-helper/testdeb.cc
  53. 4
      test/libapt/acqprogress_test.cc
  54. 8
      test/libapt/indexcopytosourcelist_test.cc

6
apt-inst/deb/debfile.h

@ -65,7 +65,7 @@ class debDebFile::ControlExtract : public pkgDirStream
{
public:
virtual bool DoItem(Item &Itm,int &Fd);
virtual bool DoItem(Item &Itm,int &Fd) APT_OVERRIDE;
};
class debDebFile::MemControlExtract : public pkgDirStream
@ -80,10 +80,10 @@ class debDebFile::MemControlExtract : public pkgDirStream
std::string Member;
// Members from DirStream
virtual bool DoItem(Item &Itm,int &Fd);
virtual bool DoItem(Item &Itm,int &Fd) APT_OVERRIDE;
virtual bool Process(Item &Itm,const unsigned char *Data,
#if APT_PKG_ABI >= 413
unsigned long long Size,unsigned long long Pos);
unsigned long long Size,unsigned long long Pos) APT_OVERRIDE;
#else
unsigned long Size,unsigned long Pos);
#endif

6
apt-inst/extract.h

@ -38,9 +38,9 @@ class pkgExtract : public pkgDirStream
public:
virtual bool DoItem(Item &Itm,int &Fd);
virtual bool Fail(Item &Itm,int Fd);
virtual bool FinishedFile(Item &Itm,int Fd);
virtual bool DoItem(Item &Itm,int &Fd) APT_OVERRIDE;
virtual bool Fail(Item &Itm,int Fd) APT_OVERRIDE;
virtual bool FinishedFile(Item &Itm,int Fd) APT_OVERRIDE;
bool Finished();
bool Aborted();

4
apt-pkg/acquire-item.cc

@ -391,8 +391,8 @@ class APT_HIDDEN NoActionItem : public pkgAcquire::Item /*{{{*/
{
IndexTarget const Target;
public:
virtual std::string DescURI() const {return Target.URI;};
virtual HashStringList GetExpectedHashes() const {return HashStringList();};
virtual std::string DescURI() const APT_OVERRIDE {return Target.URI;};
virtual HashStringList GetExpectedHashes() const APT_OVERRIDE {return HashStringList();};
NoActionItem(pkgAcquire * const Owner, IndexTarget const &Target) :
pkgAcquire::Item(Owner), Target(Target)

140
apt-pkg/acquire-item.h

@ -349,7 +349,7 @@ class APT_HIDDEN pkgAcqTransactionItem: public pkgAcquire::Item /*{{{*/
IndexTarget const Target;
HashStringList GetExpectedHashesFor(std::string const &MetaKey) const;
bool QueueURI(pkgAcquire::ItemDesc &Item);
bool QueueURI(pkgAcquire::ItemDesc &Item) APT_OVERRIDE;
public:
/** \brief storge name until a transaction is finished */
@ -364,10 +364,10 @@ class APT_HIDDEN pkgAcqTransactionItem: public pkgAcquire::Item /*{{{*/
};
virtual bool TransactionState(TransactionStates const state);
virtual std::string DescURI() const { return Target.URI; }
virtual HashStringList GetExpectedHashes() const;
virtual std::string DescURI() const APT_OVERRIDE { return Target.URI; }
virtual HashStringList GetExpectedHashes() const APT_OVERRIDE;
virtual std::string GetMetaKey() const;
virtual bool HashesRequired() const;
virtual bool HashesRequired() const APT_OVERRIDE;
pkgAcqTransactionItem(pkgAcquire * const Owner, pkgAcqMetaClearSig * const TransactionManager, IndexTarget const &Target);
@ -417,7 +417,7 @@ class APT_HIDDEN pkgAcqMetaBase : public pkgAcqTransactionItem /*{{{*/
/** \brief Queue the downloaded Signature for verification */
void QueueForSignatureVerify(pkgAcqTransactionItem * const I, std::string const &File, std::string const &Signature);
virtual std::string Custom600Headers() const;
virtual std::string Custom600Headers() const APT_OVERRIDE;
/** \brief Called when authentication succeeded.
*
@ -440,15 +440,15 @@ class APT_HIDDEN pkgAcqMetaBase : public pkgAcqTransactionItem /*{{{*/
*/
bool VerifyVendor(std::string const &Message);
virtual bool TransactionState(TransactionStates const state);
virtual bool TransactionState(TransactionStates const state) APT_OVERRIDE;
public:
// This refers more to the Transaction-Manager than the actual file
bool IMSHit;
virtual bool QueueURI(pkgAcquire::ItemDesc &Item);
virtual HashStringList GetExpectedHashes() const;
virtual bool HashesRequired() const;
virtual bool QueueURI(pkgAcquire::ItemDesc &Item) APT_OVERRIDE;
virtual HashStringList GetExpectedHashes() const APT_OVERRIDE;
virtual bool HashesRequired() const APT_OVERRIDE;
// transaction code
void Add(pkgAcqTransactionItem * const I);
@ -466,7 +466,7 @@ class APT_HIDDEN pkgAcqMetaBase : public pkgAcqTransactionItem /*{{{*/
void TransactionStageRemoval(pkgAcqTransactionItem * const I, const std::string &FinalFile);
/** \brief Get the full pathname of the final file for the current URI */
virtual std::string GetFinalFilename() const;
virtual std::string GetFinalFilename() const APT_OVERRIDE;
pkgAcqMetaBase(pkgAcquire * const Owner, pkgAcqMetaClearSig * const TransactionManager,
std::vector<IndexTarget> const &IndexTargets,
@ -494,13 +494,13 @@ class APT_HIDDEN pkgAcqMetaIndex : public pkgAcqMetaBase
void Init(std::string const &URIDesc, std::string const &ShortDesc);
public:
virtual std::string DescURI() const;
virtual std::string DescURI() const APT_OVERRIDE;
// Specialized action members
virtual void Failed(std::string const &Message,pkgAcquire::MethodConfig const * const Cnf);
virtual void Failed(std::string const &Message,pkgAcquire::MethodConfig const * const Cnf) APT_OVERRIDE;
virtual void Done(std::string const &Message, HashStringList const &Hashes,
pkgAcquire::MethodConfig const * const Cnf);
virtual void Finished();
pkgAcquire::MethodConfig const * const Cnf) APT_OVERRIDE;
virtual void Finished() APT_OVERRIDE;
/** \brief Create a new pkgAcqMetaIndex. */
pkgAcqMetaIndex(pkgAcquire * const Owner, pkgAcqMetaClearSig * const TransactionManager,
@ -531,16 +531,16 @@ class APT_HIDDEN pkgAcqMetaSig : public pkgAcqTransactionItem
protected:
/** \brief Get the full pathname of the final file for the current URI */
virtual std::string GetFinalFilename() const;
virtual std::string GetFinalFilename() const APT_OVERRIDE;
public:
virtual bool HashesRequired() const { return false; }
virtual bool HashesRequired() const APT_OVERRIDE { return false; }
// Specialized action members
virtual void Failed(std::string const &Message,pkgAcquire::MethodConfig const * const Cnf);
virtual void Failed(std::string const &Message,pkgAcquire::MethodConfig const * const Cnf) APT_OVERRIDE;
virtual void Done(std::string const &Message, HashStringList const &Hashes,
pkgAcquire::MethodConfig const * const Cnf);
virtual std::string Custom600Headers() const;
pkgAcquire::MethodConfig const * const Cnf) APT_OVERRIDE;
virtual std::string Custom600Headers() const APT_OVERRIDE;
/** \brief Create a new pkgAcqMetaSig. */
pkgAcqMetaSig(pkgAcquire * const Owner, pkgAcqMetaClearSig * const TransactionManager,
@ -561,10 +561,10 @@ class APT_HIDDEN pkgAcqMetaClearSig : public pkgAcqMetaIndex
metaIndex *MetaIndexParser;
metaIndex *LastMetaIndexParser;
virtual void Failed(std::string const &Message,pkgAcquire::MethodConfig const * const Cnf);
virtual std::string Custom600Headers() const;
virtual void Failed(std::string const &Message,pkgAcquire::MethodConfig const * const Cnf) APT_OVERRIDE;
virtual std::string Custom600Headers() const APT_OVERRIDE;
virtual void Done(std::string const &Message, HashStringList const &Hashes,
pkgAcquire::MethodConfig const * const Cnf);
pkgAcquire::MethodConfig const * const Cnf) APT_OVERRIDE;
/** \brief Create a new pkgAcqMetaClearSig. */
pkgAcqMetaClearSig(pkgAcquire * const Owner,
@ -583,7 +583,7 @@ class APT_HIDDEN pkgAcqBaseIndex : public pkgAcqTransactionItem
public:
/** \brief Get the full pathname of the final file for the current URI */
virtual std::string GetFinalFilename() const;
virtual std::string GetFinalFilename() const APT_OVERRIDE;
pkgAcqBaseIndex(pkgAcquire * const Owner, pkgAcqMetaClearSig * const TransactionManager,
IndexTarget const &Target);
@ -614,19 +614,19 @@ class APT_HIDDEN pkgAcqDiffIndex : public pkgAcqBaseIndex
std::string Description;
/** \brief Get the full pathname of the final file for the current URI */
virtual std::string GetFinalFilename() const;
virtual std::string GetFinalFilename() const APT_OVERRIDE;
virtual bool QueueURI(pkgAcquire::ItemDesc &Item);
virtual bool QueueURI(pkgAcquire::ItemDesc &Item) APT_OVERRIDE;
virtual bool TransactionState(TransactionStates const state);
virtual bool TransactionState(TransactionStates const state) APT_OVERRIDE;
public:
// Specialized action members
virtual void Failed(std::string const &Message, pkgAcquire::MethodConfig const * const Cnf);
virtual void Failed(std::string const &Message, pkgAcquire::MethodConfig const * const Cnf) APT_OVERRIDE;
virtual void Done(std::string const &Message, HashStringList const &Hashes,
pkgAcquire::MethodConfig const * const Cnf);
virtual std::string DescURI() const {return Target.URI + "Index";};
virtual std::string Custom600Headers() const;
virtual std::string GetMetaKey() const;
pkgAcquire::MethodConfig const * const Cnf) APT_OVERRIDE;
virtual std::string DescURI() const APT_OVERRIDE {return Target.URI + "Index";};
virtual std::string Custom600Headers() const APT_OVERRIDE;
virtual std::string GetMetaKey() const APT_OVERRIDE;
/** \brief Parse the Index file for a set of Packages diffs.
*
@ -724,13 +724,13 @@ class APT_HIDDEN pkgAcqIndexMergeDiffs : public pkgAcqBaseIndex
* This method will fall back to downloading the whole index file
* outright; its arguments are ignored.
*/
virtual void Failed(std::string const &Message,pkgAcquire::MethodConfig const * const Cnf);
virtual void Failed(std::string const &Message,pkgAcquire::MethodConfig const * const Cnf) APT_OVERRIDE;
virtual void Done(std::string const &Message, HashStringList const &Hashes,
pkgAcquire::MethodConfig const * const Cnf);
virtual std::string Custom600Headers() const;
virtual std::string DescURI() const {return Target.URI + "Index";};
virtual HashStringList GetExpectedHashes() const;
virtual bool HashesRequired() const;
pkgAcquire::MethodConfig const * const Cnf) APT_OVERRIDE;
virtual std::string Custom600Headers() const APT_OVERRIDE;
virtual std::string DescURI() const APT_OVERRIDE {return Target.URI + "Index";};
virtual HashStringList GetExpectedHashes() const APT_OVERRIDE;
virtual bool HashesRequired() const APT_OVERRIDE;
/** \brief Create an index merge-diff item.
*
@ -836,14 +836,14 @@ class APT_HIDDEN pkgAcqIndexDiffs : public pkgAcqBaseIndex
* This method will fall back to downloading the whole index file
* outright; its arguments are ignored.
*/
virtual void Failed(std::string const &Message,pkgAcquire::MethodConfig const * const Cnf);
virtual void Failed(std::string const &Message,pkgAcquire::MethodConfig const * const Cnf) APT_OVERRIDE;
virtual void Done(std::string const &Message, HashStringList const &Hashes,
pkgAcquire::MethodConfig const * const Cnf);
virtual std::string Custom600Headers() const;
virtual std::string DescURI() const {return Target.URI + "IndexDiffs";};
virtual HashStringList GetExpectedHashes() const;
virtual bool HashesRequired() const;
pkgAcquire::MethodConfig const * const Cnf) APT_OVERRIDE;
virtual std::string Custom600Headers() const APT_OVERRIDE;
virtual std::string DescURI() const APT_OVERRIDE {return Target.URI + "IndexDiffs";};
virtual HashStringList GetExpectedHashes() const APT_OVERRIDE;
virtual bool HashesRequired() const APT_OVERRIDE;
/** \brief Create an index diff item.
*
@ -928,18 +928,18 @@ class APT_HIDDEN pkgAcqIndex : public pkgAcqBaseIndex
void ReverifyAfterIMS();
/** \brief Get the full pathname of the final file for the current URI */
virtual std::string GetFinalFilename() const;
virtual std::string GetFinalFilename() const APT_OVERRIDE;
virtual bool TransactionState(TransactionStates const state);
virtual bool TransactionState(TransactionStates const state) APT_OVERRIDE;
public:
// Specialized action members
virtual void Failed(std::string const &Message,pkgAcquire::MethodConfig const * const Cnf);
virtual void Failed(std::string const &Message,pkgAcquire::MethodConfig const * const Cnf) APT_OVERRIDE;
virtual void Done(std::string const &Message, HashStringList const &Hashes,
pkgAcquire::MethodConfig const * const Cnf);
virtual std::string Custom600Headers() const;
virtual std::string DescURI() const {return Desc.URI;};
virtual std::string GetMetaKey() const;
pkgAcquire::MethodConfig const * const Cnf) APT_OVERRIDE;
virtual std::string Custom600Headers() const APT_OVERRIDE;
virtual std::string DescURI() const APT_OVERRIDE {return Desc.URI;};
virtual std::string GetMetaKey() const APT_OVERRIDE;
pkgAcqIndex(pkgAcquire * const Owner, pkgAcqMetaClearSig * const TransactionManager,
IndexTarget const &Target);
@ -1000,19 +1000,19 @@ class pkgAcqArchive : public pkgAcquire::Item
bool QueueNext();
/** \brief Get the full pathname of the final file for the current URI */
virtual std::string GetFinalFilename() const;
virtual std::string GetFinalFilename() const APT_OVERRIDE;
public:
virtual void Failed(std::string const &Message,pkgAcquire::MethodConfig const * const Cnf);
virtual void Failed(std::string const &Message,pkgAcquire::MethodConfig const * const Cnf) APT_OVERRIDE;
virtual void Done(std::string const &Message, HashStringList const &Hashes,
pkgAcquire::MethodConfig const * const Cnf);
virtual std::string DescURI() const;
virtual std::string ShortDesc() const;
virtual void Finished();
virtual bool IsTrusted() const;
virtual HashStringList GetExpectedHashes() const;
virtual bool HashesRequired() const;
pkgAcquire::MethodConfig const * const Cnf) APT_OVERRIDE;
virtual std::string DescURI() const APT_OVERRIDE;
virtual std::string ShortDesc() const APT_OVERRIDE;
virtual void Finished() APT_OVERRIDE;
virtual bool IsTrusted() const APT_OVERRIDE;
virtual HashStringList GetExpectedHashes() const APT_OVERRIDE;
virtual bool HashesRequired() const APT_OVERRIDE;
/** \brief Create a new pkgAcqArchive.
*
@ -1053,14 +1053,14 @@ class pkgAcqChangelog : public pkgAcquire::Item
public:
// we will never have hashes for changelogs.
// If you need verified ones, download the deb and extract the changelog.
virtual HashStringList GetExpectedHashes() const { return HashStringList(); }
virtual bool HashesRequired() const { return false; }
virtual HashStringList GetExpectedHashes() const APT_OVERRIDE { return HashStringList(); }
virtual bool HashesRequired() const APT_OVERRIDE { return false; }
// Specialized action members
virtual void Failed(std::string const &Message,pkgAcquire::MethodConfig const * const Cnf);
virtual void Failed(std::string const &Message,pkgAcquire::MethodConfig const * const Cnf) APT_OVERRIDE;
virtual void Done(std::string const &Message, HashStringList const &CalcHashes,
pkgAcquire::MethodConfig const * const Cnf);
virtual std::string DescURI() const {return Desc.URI;};
pkgAcquire::MethodConfig const * const Cnf) APT_OVERRIDE;
virtual std::string DescURI() const APT_OVERRIDE {return Desc.URI;};
/** returns the URI to the changelog of this version
*
@ -1172,15 +1172,15 @@ class pkgAcqFile : public pkgAcquire::Item
HashStringList const ExpectedHashes;
public:
virtual HashStringList GetExpectedHashes() const;
virtual bool HashesRequired() const;
virtual HashStringList GetExpectedHashes() const APT_OVERRIDE;
virtual bool HashesRequired() const APT_OVERRIDE;
// Specialized action members
virtual void Failed(std::string const &Message,pkgAcquire::MethodConfig const * const Cnf);
virtual void Failed(std::string const &Message,pkgAcquire::MethodConfig const * const Cnf) APT_OVERRIDE;
virtual void Done(std::string const &Message, HashStringList const &CalcHashes,
pkgAcquire::MethodConfig const * const Cnf);
virtual std::string DescURI() const {return Desc.URI;};
virtual std::string Custom600Headers() const;
pkgAcquire::MethodConfig const * const Cnf) APT_OVERRIDE;
virtual std::string DescURI() const APT_OVERRIDE {return Desc.URI;};
virtual std::string Custom600Headers() const APT_OVERRIDE;
/** \brief Create a new pkgAcqFile object.
*

8
apt-pkg/algorithms.h

@ -62,7 +62,7 @@ class pkgSimulate : public pkgPackageManager /*{{{*/
pkgDepCache *Cache;
public:
virtual VerIterator GetCandidateVer(PkgIterator const &Pkg)
virtual VerIterator GetCandidateVer(PkgIterator const &Pkg) APT_OVERRIDE
{
return (*Cache)[Pkg].CandidateVerIter(*Cache);
}
@ -77,9 +77,9 @@ class pkgSimulate : public pkgPackageManager /*{{{*/
pkgDepCache::ActionGroup group;
// The Actuall installation implementation
virtual bool Install(PkgIterator Pkg,std::string File);
virtual bool Configure(PkgIterator Pkg);
virtual bool Remove(PkgIterator Pkg,bool Purge);
virtual bool Install(PkgIterator Pkg,std::string File) APT_OVERRIDE;
virtual bool Configure(PkgIterator Pkg) APT_OVERRIDE;
virtual bool Remove(PkgIterator Pkg,bool Purge) APT_OVERRIDE;
private:
APT_HIDDEN void ShortBreaks();

46
apt-pkg/cachefilter.h

@ -30,33 +30,33 @@ public:
class PackageMatcher : public Matcher {
public:
virtual bool operator() (pkgCache::PkgIterator const &Pkg) = 0;
virtual bool operator() (pkgCache::VerIterator const &Ver) { return (*this)(Ver.ParentPkg()); }
virtual bool operator() (pkgCache::GrpIterator const &/*Grp*/) { return false; }
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();
};
// Generica like True, False, NOT, AND, OR /*{{{*/
class TrueMatcher : public Matcher {
public:
virtual bool operator() (pkgCache::PkgIterator const &Pkg);
virtual bool operator() (pkgCache::GrpIterator const &Grp);
virtual bool operator() (pkgCache::VerIterator const &Ver);
virtual bool operator() (pkgCache::PkgIterator const &Pkg) APT_OVERRIDE;
virtual bool operator() (pkgCache::GrpIterator const &Grp) APT_OVERRIDE;
virtual bool operator() (pkgCache::VerIterator const &Ver) APT_OVERRIDE;
};
class FalseMatcher : public Matcher {
public:
virtual bool operator() (pkgCache::PkgIterator const &Pkg);
virtual bool operator() (pkgCache::GrpIterator const &Grp);
virtual bool operator() (pkgCache::VerIterator const &Ver);
virtual bool operator() (pkgCache::PkgIterator const &Pkg) APT_OVERRIDE;
virtual bool operator() (pkgCache::GrpIterator const &Grp) APT_OVERRIDE;
virtual bool operator() (pkgCache::VerIterator const &Ver) APT_OVERRIDE;
};
class NOTMatcher : public Matcher {
Matcher * const matcher;
public:
explicit NOTMatcher(Matcher * const matcher);
virtual bool operator() (pkgCache::PkgIterator const &Pkg);
virtual bool operator() (pkgCache::GrpIterator const &Grp);
virtual bool operator() (pkgCache::VerIterator const &Ver);
virtual bool operator() (pkgCache::PkgIterator const &Pkg) APT_OVERRIDE;
virtual bool operator() (pkgCache::GrpIterator const &Grp) APT_OVERRIDE;
virtual bool operator() (pkgCache::VerIterator const &Ver) APT_OVERRIDE;
virtual ~NOTMatcher();
};
@ -71,9 +71,9 @@ public:
ANDMatcher(Matcher * const matcher1, Matcher * const matcher2, Matcher * const matcher3, Matcher * const matcher4);
ANDMatcher(Matcher * const matcher1, Matcher * const matcher2, Matcher * const matcher3, Matcher * const matcher4, Matcher * const matcher5);
ANDMatcher& AND(Matcher * const matcher);
virtual bool operator() (pkgCache::PkgIterator const &Pkg);
virtual bool operator() (pkgCache::GrpIterator const &Grp);
virtual bool operator() (pkgCache::VerIterator const &Ver);
virtual bool operator() (pkgCache::PkgIterator const &Pkg) APT_OVERRIDE;
virtual bool operator() (pkgCache::GrpIterator const &Grp) APT_OVERRIDE;
virtual bool operator() (pkgCache::VerIterator const &Ver) APT_OVERRIDE;
virtual ~ANDMatcher();
};
class ORMatcher : public Matcher {
@ -87,9 +87,9 @@ public:
ORMatcher(Matcher * const matcher1, Matcher * const matcher2, Matcher * const matcher3, Matcher * const matcher4);
ORMatcher(Matcher * const matcher1, Matcher * const matcher2, Matcher * const matcher3, Matcher * const matcher4, Matcher * const matcher5);
ORMatcher& OR(Matcher * const matcher);
virtual bool operator() (pkgCache::PkgIterator const &Pkg);
virtual bool operator() (pkgCache::GrpIterator const &Grp);
virtual bool operator() (pkgCache::VerIterator const &Ver);
virtual bool operator() (pkgCache::PkgIterator const &Pkg) APT_OVERRIDE;
virtual bool operator() (pkgCache::GrpIterator const &Grp) APT_OVERRIDE;
virtual bool operator() (pkgCache::VerIterator const &Ver) APT_OVERRIDE;
virtual ~ORMatcher();
};
/*}}}*/
@ -97,8 +97,8 @@ class PackageNameMatchesRegEx : public PackageMatcher { /*{{{*/
regex_t* pattern;
public:
explicit PackageNameMatchesRegEx(std::string const &Pattern);
virtual bool operator() (pkgCache::PkgIterator const &Pkg);
virtual bool operator() (pkgCache::GrpIterator const &Grp);
virtual bool operator() (pkgCache::PkgIterator const &Pkg) APT_OVERRIDE;
virtual bool operator() (pkgCache::GrpIterator const &Grp) APT_OVERRIDE;
virtual ~PackageNameMatchesRegEx();
};
/*}}}*/
@ -106,8 +106,8 @@ class PackageNameMatchesFnmatch : public PackageMatcher { /*{{{*/
const std::string Pattern;
public:
explicit PackageNameMatchesFnmatch(std::string const &Pattern);
virtual bool operator() (pkgCache::PkgIterator const &Pkg);
virtual bool operator() (pkgCache::GrpIterator const &Grp);
virtual bool operator() (pkgCache::PkgIterator const &Pkg) APT_OVERRIDE;
virtual bool operator() (pkgCache::GrpIterator const &Grp) APT_OVERRIDE;
virtual ~PackageNameMatchesFnmatch() {};
};
/*}}}*/
@ -133,7 +133,7 @@ public:
*/
PackageArchitectureMatchesSpecification(std::string const &pattern, bool const isPattern = true);
bool operator() (char const * const &arch);
virtual bool operator() (pkgCache::PkgIterator const &Pkg);
virtual bool operator() (pkgCache::PkgIterator const &Pkg) APT_OVERRIDE;
virtual ~PackageArchitectureMatchesSpecification();
};
/*}}}*/
@ -141,7 +141,7 @@ class PackageIsNewInstall : public PackageMatcher { /*{{{*/
pkgCacheFile * const Cache;
public:
explicit PackageIsNewInstall(pkgCacheFile * const Cache);
virtual bool operator() (pkgCache::PkgIterator const &Pkg);
virtual bool operator() (pkgCache::PkgIterator const &Pkg) APT_OVERRIDE;
virtual ~PackageIsNewInstall();
};
/*}}}*/

2
apt-pkg/contrib/md5.h

@ -48,7 +48,7 @@ class MD5Summation : public SummationImplementation
public:
bool Add(const unsigned char *inbuf, unsigned long long inlen);
bool Add(const unsigned char *inbuf, unsigned long long inlen) APT_OVERRIDE;
using SummationImplementation::Add;
MD5SumValue Result();

5
apt-pkg/contrib/progress.h

@ -24,6 +24,7 @@
#include <string>
#include <sys/time.h>
#include <apt-pkg/macros.h>
#ifndef APT_8_CLEANER_HEADERS
using std::string;
@ -74,12 +75,12 @@ class OpTextProgress : public OpProgress
bool NoUpdate;
bool NoDisplay;
unsigned long LastLen;
virtual void Update();
virtual void Update() APT_OVERRIDE;
void Write(const char *S);
public:
virtual void Done();
virtual void Done() APT_OVERRIDE;
OpTextProgress(bool NoUpdate = false) : NoUpdate(NoUpdate),
NoDisplay(false), LastLen(0) {};

2
apt-pkg/contrib/sha1.h

@ -37,7 +37,7 @@ class SHA1Summation : public SummationImplementation
bool Done;
public:
bool Add(const unsigned char *inbuf, unsigned long long inlen);
bool Add(const unsigned char *inbuf, unsigned long long inlen) APT_OVERRIDE;
using SummationImplementation::Add;
SHA1SumValue Result();

4
apt-pkg/contrib/sha2.h

@ -45,7 +45,7 @@ class SHA256Summation : public SHA2SummationBase
unsigned char Sum[32];
public:
bool Add(const unsigned char *inbuf, unsigned long long len)
bool Add(const unsigned char *inbuf, unsigned long long len) APT_OVERRIDE
{
if (Done)
return false;
@ -78,7 +78,7 @@ class SHA512Summation : public SHA2SummationBase
unsigned char Sum[64];
public:
bool Add(const unsigned char *inbuf, unsigned long long len)
bool Add(const unsigned char *inbuf, unsigned long long len) APT_OVERRIDE
{
if (Done)
return false;

10
apt-pkg/deb/debindexfile.cc

@ -482,7 +482,7 @@ class APT_HIDDEN debIFTypePkg : public pkgIndexFile::Type
{
public:
virtual pkgRecords::Parser *CreatePkgParser(pkgCache::PkgFileIterator File) const
virtual pkgRecords::Parser *CreatePkgParser(pkgCache::PkgFileIterator File) const APT_OVERRIDE
{
return new debRecordParser(File.FileName(),*File.Cache());
};
@ -497,7 +497,7 @@ class APT_HIDDEN debIFTypeStatus : public pkgIndexFile::Type
{
public:
virtual pkgRecords::Parser *CreatePkgParser(pkgCache::PkgFileIterator File) const
virtual pkgRecords::Parser *CreatePkgParser(pkgCache::PkgFileIterator File) const APT_OVERRIDE
{
return new debRecordParser(File.FileName(),*File.Cache());
};
@ -506,7 +506,7 @@ class APT_HIDDEN debIFTypeStatus : public pkgIndexFile::Type
class APT_HIDDEN debIFTypeDebPkgFile : public pkgIndexFile::Type
{
public:
virtual pkgRecords::Parser *CreatePkgParser(pkgCache::PkgFileIterator File) const
virtual pkgRecords::Parser *CreatePkgParser(pkgCache::PkgFileIterator File) const APT_OVERRIDE
{
return new debDebFileRecordParser(File.FileName());
};
@ -515,7 +515,7 @@ class APT_HIDDEN debIFTypeDebPkgFile : public pkgIndexFile::Type
class APT_HIDDEN debIFTypeDscFile : public pkgIndexFile::Type
{
public:
virtual pkgSrcRecords::Parser *CreateSrcPkgParser(std::string DscFile) const
virtual pkgSrcRecords::Parser *CreateSrcPkgParser(std::string DscFile) const APT_OVERRIDE
{
return new debDscRecordParser(DscFile, NULL);
};
@ -524,7 +524,7 @@ class APT_HIDDEN debIFTypeDscFile : public pkgIndexFile::Type
class APT_HIDDEN debIFTypeDebianSourceDir : public pkgIndexFile::Type
{
public:
virtual pkgSrcRecords::Parser *CreateSrcPkgParser(std::string SourceDir) const
virtual pkgSrcRecords::Parser *CreateSrcPkgParser(std::string SourceDir) const APT_OVERRIDE
{
return new debDscRecordParser(SourceDir + string("/debian/control"), NULL);
};

56
apt-pkg/deb/debindexfile.h

@ -38,14 +38,14 @@ class APT_HIDDEN debStatusIndex : public pkgIndexFile
virtual const Type *GetType() const APT_CONST;
// Interface for acquire
virtual std::string Describe(bool /*Short*/) const {return File;};
virtual std::string Describe(bool /*Short*/) const APT_OVERRIDE {return File;};
// Interface for the Cache Generator
virtual bool Exists() const;
virtual bool HasPackages() const {return true;};
virtual unsigned long Size() const;
virtual bool Merge(pkgCacheGenerator &Gen,OpProgress *Prog) const;
virtual pkgCache::PkgFileIterator FindInCache(pkgCache &Cache) const;
virtual bool Exists() const APT_OVERRIDE;
virtual bool HasPackages() const APT_OVERRIDE {return true;};
virtual unsigned long Size() const APT_OVERRIDE;
virtual bool Merge(pkgCacheGenerator &Gen,OpProgress *Prog) const APT_OVERRIDE;
virtual pkgCache::PkgFileIterator FindInCache(pkgCache &Cache) const APT_OVERRIDE;
debStatusIndex(std::string File);
virtual ~debStatusIndex();
@ -59,12 +59,12 @@ class APT_HIDDEN debPackagesIndex : public pkgIndexTargetFile
virtual const Type *GetType() const APT_CONST;
// Stuff for accessing files on remote items
virtual std::string ArchiveInfo(pkgCache::VerIterator Ver) const;
virtual std::string ArchiveInfo(pkgCache::VerIterator Ver) const APT_OVERRIDE;
// Interface for the Cache Generator
virtual bool HasPackages() const {return true;};
virtual bool Merge(pkgCacheGenerator &Gen,OpProgress *Prog) const;
virtual pkgCache::PkgFileIterator FindInCache(pkgCache &Cache) const;
virtual bool HasPackages() const APT_OVERRIDE {return true;};
virtual bool Merge(pkgCacheGenerator &Gen,OpProgress *Prog) const APT_OVERRIDE;
virtual pkgCache::PkgFileIterator FindInCache(pkgCache &Cache) const APT_OVERRIDE;
debPackagesIndex(IndexTarget const &Target, bool const Trusted);
virtual ~debPackagesIndex();
@ -78,9 +78,9 @@ class APT_HIDDEN debTranslationsIndex : public pkgIndexTargetFile
virtual const Type *GetType() const APT_CONST;
// Interface for the Cache Generator
virtual bool HasPackages() const;
virtual bool Merge(pkgCacheGenerator &Gen,OpProgress *Prog) const;
virtual pkgCache::PkgFileIterator FindInCache(pkgCache &Cache) const;
virtual bool HasPackages() const APT_OVERRIDE;
virtual bool Merge(pkgCacheGenerator &Gen,OpProgress *Prog) const APT_OVERRIDE;
virtual pkgCache::PkgFileIterator FindInCache(pkgCache &Cache) const APT_OVERRIDE;
debTranslationsIndex(IndexTarget const &Target);
virtual ~debTranslationsIndex();
@ -95,13 +95,13 @@ class APT_HIDDEN debSourcesIndex : public pkgIndexTargetFile
// Stuff for accessing files on remote items
virtual std::string SourceInfo(pkgSrcRecords::Parser const &Record,
pkgSrcRecords::File const &File) const;
pkgSrcRecords::File const &File) const APT_OVERRIDE;
// Interface for the record parsers
virtual pkgSrcRecords::Parser *CreateSrcParser() const;
virtual pkgSrcRecords::Parser *CreateSrcParser() const APT_OVERRIDE;
// Interface for the Cache Generator
virtual bool HasPackages() const {return false;};
virtual bool HasPackages() const APT_OVERRIDE {return false;};
debSourcesIndex(IndexTarget const &Target, bool const Trusted);
virtual ~debSourcesIndex();
@ -117,7 +117,7 @@ class APT_HIDDEN debDebPkgFileIndex : public pkgIndexFile
public:
virtual const Type *GetType() const APT_CONST;
virtual std::string Describe(bool /*Short*/) const {
virtual std::string Describe(bool /*Short*/) const APT_OVERRIDE {
return DebFile;
}
@ -130,16 +130,16 @@ class APT_HIDDEN debDebPkgFileIndex : public pkgIndexFile
static bool GetContent(std::ostream &content, std::string const &debfile);
// Interface for the Cache Generator
virtual bool Exists() const;
virtual bool HasPackages() const {
virtual bool Exists() const APT_OVERRIDE;
virtual bool HasPackages() const APT_OVERRIDE {
return true;
};
virtual unsigned long Size() const;
virtual bool Merge(pkgCacheGenerator &Gen,OpProgress *Prog) const;
virtual pkgCache::PkgFileIterator FindInCache(pkgCache &Cache) const;
virtual unsigned long Size() const APT_OVERRIDE;
virtual bool Merge(pkgCacheGenerator &Gen,OpProgress *Prog) const APT_OVERRIDE;
virtual pkgCache::PkgFileIterator FindInCache(pkgCache &Cache) const APT_OVERRIDE;
// Interface for acquire
virtual std::string ArchiveURI(std::string /*File*/) const;
virtual std::string ArchiveURI(std::string /*File*/) const APT_OVERRIDE;
debDebPkgFileIndex(std::string DebFile);
virtual ~debDebPkgFileIndex();
@ -152,11 +152,11 @@ class APT_HIDDEN debDscFileIndex : public pkgIndexFile
std::string DscFile;
public:
virtual const Type *GetType() const APT_CONST;
virtual pkgSrcRecords::Parser *CreateSrcParser() const;
virtual bool Exists() const;
virtual bool HasPackages() const {return false;};
virtual unsigned long Size() const;
virtual std::string Describe(bool /*Short*/) const {
virtual pkgSrcRecords::Parser *CreateSrcParser() const APT_OVERRIDE;
virtual bool Exists() const APT_OVERRIDE;
virtual bool HasPackages() const APT_OVERRIDE {return false;};
virtual unsigned long Size() const APT_OVERRIDE;
virtual std::string Describe(bool /*Short*/) const APT_OVERRIDE {
return DscFile;
};

34
apt-pkg/deb/deblistparser.h

@ -62,24 +62,24 @@ class APT_HIDDEN debListParser : public pkgCacheGenerator::ListParser
APT_PUBLIC static unsigned char GetPrio(std::string Str);
// These all operate against the current section
virtual std::string Package();
virtual std::string Architecture();
virtual bool ArchitectureAll();
virtual std::string Version();
virtual bool NewVersion(pkgCache::VerIterator &Ver);
virtual std::string Description(std::string const &lang);
virtual std::vector<std::string> AvailableDescriptionLanguages();
virtual MD5SumValue Description_md5();
virtual unsigned short VersionHash();
virtual std::string Package() APT_OVERRIDE;
virtual std::string Architecture() APT_OVERRIDE;
virtual bool ArchitectureAll() APT_OVERRIDE;
virtual std::string Version() APT_OVERRIDE;
virtual bool NewVersion(pkgCache::VerIterator &Ver) APT_OVERRIDE;
virtual std::string Description(std::string const &lang) APT_OVERRIDE;
virtual std::vector<std::string> AvailableDescriptionLanguages() APT_OVERRIDE;
virtual MD5SumValue Description_md5() APT_OVERRIDE;
virtual unsigned short VersionHash() APT_OVERRIDE;
#if APT_PKG_ABI >= 413
virtual bool SameVersion(unsigned short const Hash, pkgCache::VerIterator const &Ver);
virtual bool SameVersion(unsigned short const Hash, pkgCache::VerIterator const &Ver) APT_OVERRIDE;
#endif
virtual bool UsePackage(pkgCache::PkgIterator &Pkg,
pkgCache::VerIterator &Ver);
virtual map_filesize_t Offset() {return iOffset;};
virtual map_filesize_t Size() {return Section.size();};
pkgCache::VerIterator &Ver) APT_OVERRIDE;
virtual map_filesize_t Offset() APT_OVERRIDE {return iOffset;};
virtual map_filesize_t Size() APT_OVERRIDE {return Section.size();};
virtual bool Step();
virtual bool Step() APT_OVERRIDE;
bool LoadReleaseInfo(pkgCache::RlsFileIterator &FileI,FileFd &File,
std::string const &section);
@ -111,15 +111,15 @@ class APT_HIDDEN debDebFileParser : public debListParser
public:
debDebFileParser(FileFd *File, std::string const &DebFile);
virtual bool UsePackage(pkgCache::PkgIterator &Pkg,
pkgCache::VerIterator &Ver);
pkgCache::VerIterator &Ver) APT_OVERRIDE;
};
class APT_HIDDEN debTranslationsParser : public debListParser
{
public:
// a translation can never be a real package
virtual std::string Architecture() { return ""; }
virtual std::string Version() { return ""; }
virtual std::string Architecture() APT_OVERRIDE { return ""; }
virtual std::string Version() APT_OVERRIDE { return ""; }
debTranslationsParser(FileFd *File, std::string const &Arch = "")
: debListParser(File, Arch) {};

6
apt-pkg/deb/debmetaindex.cc

@ -758,7 +758,7 @@ class APT_HIDDEN debSLTypeDeb : public debSLTypeDebian /*{{{*/
bool CreateItem(std::vector<metaIndex *> &List, std::string const &URI,
std::string const &Dist, std::string const &Section,
std::map<std::string, std::string> const &Options) const
std::map<std::string, std::string> const &Options) const APT_OVERRIDE
{
return CreateItemInternal(List, URI, Dist, Section, false, Options);
}
@ -774,7 +774,7 @@ class APT_HIDDEN debSLTypeDebSrc : public debSLTypeDebian /*{{{*/
bool CreateItem(std::vector<metaIndex *> &List, std::string const &URI,
std::string const &Dist, std::string const &Section,
std::map<std::string, std::string> const &Options) const
std::map<std::string, std::string> const &Options) const APT_OVERRIDE
{
return CreateItemInternal(List, URI, Dist, Section, true, Options);
}
@ -800,7 +800,7 @@ class APT_HIDDEN debSLTypeDebFile : public pkgSourceList::Type /*{{{*/
bool CreateItem(std::vector<metaIndex *> &List, std::string const &URI,
std::string const &/*Dist*/, std::string const &/*Section*/,
std::map<std::string, std::string> const &/*Options*/) const
std::map<std::string, std::string> const &/*Options*/) const APT_OVERRIDE
{
metaIndex *mi = new debDebFileMetaIndex(URI);
List.push_back(mi);

34
apt-pkg/deb/debmetaindex.h

@ -39,18 +39,18 @@ class APT_HIDDEN debReleaseIndex : public metaIndex
debReleaseIndex(std::string const &URI, std::string const &Dist, bool const Trusted);
virtual ~debReleaseIndex();
virtual std::string ArchiveURI(std::string const &File) const {return URI + File;};
virtual bool GetIndexes(pkgAcquire *Owner, bool const &GetAll=false);
virtual std::vector<IndexTarget> GetIndexTargets() const;
virtual std::string ArchiveURI(std::string const &File) const APT_OVERRIDE {return URI + File;};
virtual bool GetIndexes(pkgAcquire *Owner, bool const &GetAll=false) APT_OVERRIDE;
virtual std::vector<IndexTarget> GetIndexTargets() const APT_OVERRIDE;
virtual std::string Describe() const;
virtual pkgCache::RlsFileIterator FindInCache(pkgCache &Cache, bool const ModifyCheck) const;
virtual bool Merge(pkgCacheGenerator &Gen,OpProgress *Prog) const;
virtual std::string Describe() const APT_OVERRIDE;
virtual pkgCache::RlsFileIterator FindInCache(pkgCache &Cache, bool const ModifyCheck) const APT_OVERRIDE;
virtual bool Merge(pkgCacheGenerator &Gen,OpProgress *Prog) const APT_OVERRIDE;
virtual bool Load(std::string const &Filename, std::string * const ErrorText);
virtual metaIndex * UnloadedClone() const;
virtual bool Load(std::string const &Filename, std::string * const ErrorText) APT_OVERRIDE;
virtual metaIndex * UnloadedClone() const APT_OVERRIDE;
virtual std::vector <pkgIndexFile *> *GetIndexFiles();
virtual std::vector <pkgIndexFile *> *GetIndexFiles() APT_OVERRIDE;
bool SetTrusted(TriState const Trusted);
bool SetCheckValidUntil(TriState const Trusted);
@ -58,7 +58,7 @@ class APT_HIDDEN debReleaseIndex : public metaIndex
bool SetValidUntilMax(time_t const Valid);
bool SetSignedBy(std::string const &SignedBy);
virtual bool IsTrusted() const;
virtual bool IsTrusted() const APT_OVERRIDE;
void AddComponent(bool const isSrc, std::string const &Name,
std::vector<std::string> const &Targets,
@ -73,29 +73,29 @@ private:
std::string DebFile;
debDebPkgFileIndex *DebIndex;
public:
virtual std::string ArchiveURI(std::string const& /*File*/) const {
virtual std::string ArchiveURI(std::string const& /*File*/) const APT_OVERRIDE {
return DebFile;
}
virtual bool GetIndexes(pkgAcquire* /*Owner*/, const bool& /*GetAll=false*/) {
virtual bool GetIndexes(pkgAcquire* /*Owner*/, const bool& /*GetAll=false*/) APT_OVERRIDE {
return true;
}
virtual std::vector<IndexTarget> GetIndexTargets() const {
virtual std::vector<IndexTarget> GetIndexTargets() const APT_OVERRIDE {
return std::vector<IndexTarget>();
}
virtual std::vector<pkgIndexFile *> *GetIndexFiles() {
virtual std::vector<pkgIndexFile *> *GetIndexFiles() APT_OVERRIDE {
return Indexes;
}
virtual bool IsTrusted() const {
virtual bool IsTrusted() const APT_OVERRIDE {
return true;
}
virtual bool Load(std::string const &, std::string * const ErrorText)
virtual bool Load(std::string const &, std::string * const ErrorText) APT_OVERRIDE
{
LoadedSuccessfully = TRI_NO;
if (ErrorText != NULL)
strprintf(*ErrorText, "Unparseable metaindex as it represents the standalone deb file %s", DebFile.c_str());
return false;
}
virtual metaIndex * UnloadedClone() const
virtual metaIndex * UnloadedClone() const APT_OVERRIDE
{
return NULL;
}

32
apt-pkg/deb/debrecords.h

@ -33,23 +33,23 @@ class APT_HIDDEN debRecordParserBase : public pkgRecords::Parser
public:
// These refer to the archive file for the Version
virtual std::string FileName();
virtual std::string SourcePkg();
virtual std::string SourceVer();
virtual std::string FileName() APT_OVERRIDE;
virtual std::string SourcePkg() APT_OVERRIDE;
virtual std::string SourceVer() APT_OVERRIDE;
virtual HashStringList Hashes() const;
virtual HashStringList Hashes() const APT_OVERRIDE;
// These are some general stats about the package
virtual std::string Maintainer();
virtual std::string ShortDesc(std::string const &lang);
virtual std::string LongDesc(std::string const &lang);
virtual std::string Name();
virtual std::string Homepage();
virtual std::string Maintainer() APT_OVERRIDE;
virtual std::string ShortDesc(std::string const &lang) APT_OVERRIDE;
virtual std::string LongDesc(std::string const &lang) APT_OVERRIDE;
virtual std::string Name() APT_OVERRIDE;
virtual std::string Homepage() APT_OVERRIDE;
// An arbitrary custom field
virtual std::string RecordField(const char *fieldName);
virtual std::string RecordField(const char *fieldName) APT_OVERRIDE;
virtual void GetRec(const char *&Start,const char *&Stop);
virtual void GetRec(const char *&Start,const char *&Stop) APT_OVERRIDE;
debRecordParserBase();
virtual ~debRecordParserBase();
@ -62,8 +62,8 @@ class APT_HIDDEN debRecordParser : public debRecordParserBase
FileFd File;
pkgTagFile Tags;
virtual bool Jump(pkgCache::VerFileIterator const &Ver);
virtual bool Jump(pkgCache::DescFileIterator const &Desc);
virtual bool Jump(pkgCache::VerFileIterator const &Ver) APT_OVERRIDE;
virtual bool Jump(pkgCache::DescFileIterator const &Desc) APT_OVERRIDE;
public:
debRecordParser(std::string FileName,pkgCache &Cache);
@ -80,11 +80,11 @@ class APT_HIDDEN debDebFileRecordParser : public debRecordParserBase
APT_HIDDEN bool LoadContent();
protected:
// single file files, so no jumping whatsoever
bool Jump(pkgCache::VerFileIterator const &);
bool Jump(pkgCache::DescFileIterator const &);
bool Jump(pkgCache::VerFileIterator const &) APT_OVERRIDE;
bool Jump(pkgCache::DescFileIterator const &) APT_OVERRIDE;
public:
virtual std::string FileName();
virtual std::string FileName() APT_OVERRIDE;
debDebFileRecordParser(std::string FileName);
virtual ~debDebFileRecordParser();

24
apt-pkg/deb/debsrcrecords.h

@ -36,24 +36,24 @@ class APT_HIDDEN debSrcRecordParser : public pkgSrcRecords::Parser
public:
virtual bool Restart() {return Jump(0);};
virtual bool Step() {iOffset = Tags.Offset(); return Tags.Step(Sect);};
virtual bool Jump(unsigned long const &Off) {iOffset = Off; return Tags.Jump(Sect,Off);};
virtual bool Restart() APT_OVERRIDE {return Jump(0);};
virtual bool Step() APT_OVERRIDE {iOffset = Tags.Offset(); return Tags.Step(Sect);};
virtual bool Jump(unsigned long const &Off) APT_OVERRIDE {iOffset = Off; return Tags.Jump(Sect,Off);};
virtual std::string Package() const {return Sect.FindS("Package");};
virtual std::string Version() const {return Sect.FindS("Version");};
virtual std::string Maintainer() const {return Sect.FindS("Maintainer");};
virtual std::string Section() const {return Sect.FindS("Section");};
virtual const char **Binaries();
virtual bool BuildDepends(std::vector<BuildDepRec> &BuildDeps, bool const &ArchOnly, bool const &StripMultiArch = true);
virtual unsigned long Offset() {return iOffset;};
virtual std::string AsStr()
virtual std::string Package() const APT_OVERRIDE {return Sect.FindS("Package");};
virtual std::string Version() const APT_OVERRIDE {return Sect.FindS("Version");};
virtual std::string Maintainer() const APT_OVERRIDE {return Sect.FindS("Maintainer");};
virtual std::string Section() const APT_OVERRIDE {return Sect.FindS("Section");};
virtual const char **Binaries() APT_OVERRIDE;
virtual bool BuildDepends(std::vector<BuildDepRec> &BuildDeps, bool const &ArchOnly, bool const &StripMultiArch = true) APT_OVERRIDE;
virtual unsigned long Offset() APT_OVERRIDE {return iOffset;};
virtual std::string AsStr() APT_OVERRIDE
{
const char *Start=0,*Stop=0;
Sect.GetSection(Start,Stop);
return std::string(Start,Stop);
};
virtual bool Files(std::vector<pkgSrcRecords::File> &F);
virtual bool Files(std::vector<pkgSrcRecords::File> &F) APT_OVERRIDE;
bool Files2(std::vector<pkgSrcRecords::File2> &F);
debSrcRecordParser(std::string const &File,pkgIndexFile const *Index);

16
apt-pkg/deb/debsystem.h

@ -33,15 +33,15 @@ class debSystem : public pkgSystem
public:
virtual bool Lock();
virtual bool UnLock(bool NoErrors = false);
virtual pkgPackageManager *CreatePM(pkgDepCache *Cache) const;
virtual bool Initialize(Configuration &Cnf);
virtual bool ArchiveSupported(const char *Type);
virtual signed Score(Configuration const &Cnf);
virtual bool AddStatusFiles(std::vector<pkgIndexFile *> &List);
virtual bool Lock() APT_OVERRIDE;
virtual bool UnLock(bool NoErrors = false) APT_OVERRIDE;
virtual pkgPackageManager *CreatePM(pkgDepCache *Cache) const APT_OVERRIDE;
virtual bool Initialize(Configuration &Cnf) APT_OVERRIDE;
virtual bool ArchiveSupported(const char *Type) APT_OVERRIDE;
virtual signed Score(Configuration const &Cnf) APT_OVERRIDE;
virtual bool AddStatusFiles(std::vector<pkgIndexFile *> &List) APT_OVERRIDE;
virtual bool FindIndex(pkgCache::PkgFileIterator File,
pkgIndexFile *&Found) const;
pkgIndexFile *&Found) const APT_OVERRIDE;
debSystem();
virtual ~debSystem();

4
apt-pkg/deb/debversion.h

@ -27,11 +27,11 @@ class debVersioningSystem : public pkgVersioningSystem
const char *B,const char *Bend) APT_PURE;
virtual bool CheckDep(const char *PkgVer,int Op,const char *DepVer) APT_PURE;
virtual APT_PURE int DoCmpReleaseVer(const char *A,const char *Aend,
const char *B,const char *Bend)
const char *B,const char *Bend) APT_OVERRIDE
{
return DoCmpVersion(A,Aend,B,Bend);
}
virtual std::string UpstreamVersion(const char *A);
virtual std::string UpstreamVersion(const char *A) APT_OVERRIDE;
debVersioningSystem();
};

12
apt-pkg/deb/dpkgpm.h

@ -120,14 +120,14 @@ class pkgDPkgPM : public pkgPackageManager
void ProcessDpkgStatusLine(char *line);
// The Actuall installation implementation
virtual bool Install(PkgIterator Pkg,std::string File);
virtual bool Configure(PkgIterator Pkg);
virtual bool Remove(PkgIterator Pkg,bool Purge = false);
virtual bool Install(PkgIterator Pkg,std::string File) APT_OVERRIDE;
virtual bool Configure(PkgIterator Pkg) APT_OVERRIDE;
virtual bool Remove(PkgIterator Pkg,bool Purge = false) APT_OVERRIDE;
virtual bool Go(APT::Progress::PackageManager *progress);
virtual bool Go(int StatusFd=-1);
virtual bool Go(APT::Progress::PackageManager *progress) APT_OVERRIDE;
virtual bool Go(int StatusFd=-1) APT_OVERRIDE;
virtual void Reset();
virtual void Reset() APT_OVERRIDE;
public:

2
apt-pkg/depcache.h

@ -204,7 +204,7 @@ class pkgDepCache : protected pkgCache::Namespace
DefaultRootSetFunc() : Configuration::MatchAgainstConfig("APT::NeverAutoRemove") {};
virtual ~DefaultRootSetFunc() {};
bool InRootSet(const pkgCache::PkgIterator &pkg) { return pkg.end() == false && Match(pkg.Name()); };
bool InRootSet(const pkgCache::PkgIterator &pkg) APT_OVERRIDE { return pkg.end() == false && Match(pkg.Name()); };
};
struct StateCache

2
apt-pkg/edsp/edspindexfile.cc

@ -67,7 +67,7 @@ bool edspIndex::Merge(pkgCacheGenerator &Gen,OpProgress *Prog) const
class APT_HIDDEN edspIFType: public pkgIndexFile::Type
{
public:
virtual pkgRecords::Parser *CreatePkgParser(pkgCache::PkgFileIterator) const
virtual pkgRecords::Parser *CreatePkgParser(pkgCache::PkgFileIterator) const APT_OVERRIDE
{
// we don't have a record parser for this type as the file is not presistent
return NULL;

2
apt-pkg/edsp/edspindexfile.h

@ -27,7 +27,7 @@ class APT_HIDDEN edspIndex : public debStatusIndex
virtual const Type *GetType() const APT_CONST;
virtual bool Merge(pkgCacheGenerator &Gen,OpProgress *Prog) const;
virtual bool Merge(pkgCacheGenerator &Gen,OpProgress *Prog) const APT_OVERRIDE;
edspIndex(std::string File);
virtual ~edspIndex();

8
apt-pkg/edsp/edsplistparser.h

@ -29,11 +29,11 @@ class APT_HIDDEN edspListParser : public debListParser
{
void * const d;
public:
virtual bool NewVersion(pkgCache::VerIterator &Ver);
virtual bool NewVersion(pkgCache::VerIterator &Ver) APT_OVERRIDE;
virtual std::string Description();
virtual std::string DescriptionLanguage();
virtual MD5SumValue Description_md5();
virtual unsigned short VersionHash();
virtual MD5SumValue Description_md5() APT_OVERRIDE;
virtual unsigned short VersionHash() APT_OVERRIDE;
bool LoadReleaseInfo(pkgCache::RlsFileIterator &FileI,FileFd &File,
std::string const &section);
@ -42,7 +42,7 @@ class APT_HIDDEN edspListParser : public debListParser
virtual ~edspListParser();
protected:
virtual bool ParseStatus(pkgCache::PkgIterator &Pkg,pkgCache::VerIterator &Ver);
virtual bool ParseStatus(pkgCache::PkgIterator &Pkg,pkgCache::VerIterator &Ver) APT_OVERRIDE;
};

18
apt-pkg/edsp/edspsystem.h

@ -16,6 +16,8 @@
#include <vector>
#include <apt-pkg/macros.h>
class Configuration;
class pkgDepCache;
class pkgIndexFile;
@ -31,15 +33,15 @@ class APT_HIDDEN edspSystem : public pkgSystem
public:
virtual bool Lock() APT_CONST;
virtual bool UnLock(bool NoErrors = false) APT_CONST;
virtual pkgPackageManager *CreatePM(pkgDepCache *Cache) const APT_CONST;
virtual bool Initialize(Configuration &Cnf);
virtual bool ArchiveSupported(const char *Type) APT_CONST;
virtual signed Score(Configuration const &Cnf);
virtual bool AddStatusFiles(std::vector<pkgIndexFile *> &List);
virtual bool Lock() APT_OVERRIDE APT_CONST;
virtual bool UnLock(bool NoErrors = false) APT_OVERRIDE APT_CONST;
virtual pkgPackageManager *CreatePM(pkgDepCache *Cache) const APT_OVERRIDE APT_CONST;
virtual bool Initialize(Configuration &Cnf) APT_OVERRIDE;
virtual bool ArchiveSupported(const char *Type) APT_OVERRIDE APT_CONST;
virtual signed Score(Configuration const &Cnf) APT_OVERRIDE;
virtual bool AddStatusFiles(std::vector<pkgIndexFile *> &List) APT_OVERRIDE;
virtual bool FindIndex(pkgCache::PkgFileIterator File,
pkgIndexFile *&Found) const;
pkgIndexFile *&Found) const APT_OVERRIDE;
edspSystem();
virtual ~edspSystem();

16
apt-pkg/indexcopy.h

@ -62,10 +62,10 @@ class PackageCopy : public IndexCopy /*{{{*/
void * const d;
protected:
virtual bool GetFile(std::string &Filename,unsigned long long &Size);
virtual bool RewriteEntry(FileFd &Target, std::string const &File);
virtual const char *GetFileName() {return "Packages";};
virtual const char *Type() {return "Package";};
virtual bool GetFile(std::string &Filename,unsigned long long &Size) APT_OVERRIDE;
virtual bool RewriteEntry(FileFd &Target, std::string const &File) APT_OVERRIDE;
virtual const char *GetFileName() APT_OVERRIDE {return "Packages";};
virtual const char *Type() APT_OVERRIDE {return "Package";};
public:
PackageCopy();
@ -77,10 +77,10 @@ class SourceCopy : public IndexCopy /*{{{*/
void * const d;
protected:
virtual bool GetFile(std::string &Filename,unsigned long long &Size);
virtual bool RewriteEntry(FileFd &Target, std::string const &File);
virtual const char *GetFileName() {return "Sources";};
virtual const char *Type() {return "Source";};
virtual bool GetFile(std::string &Filename,unsigned long long &Size) APT_OVERRIDE;
virtual bool RewriteEntry(FileFd &Target, std::string const &File) APT_OVERRIDE;
virtual const char *GetFileName() APT_OVERRIDE {return "Sources";};
virtual const char *Type() APT_OVERRIDE {return "Source";};
public:
SourceCopy();

8
apt-pkg/indexfile.h

@ -160,10 +160,10 @@ protected:
std::string IndexFileName() const;
public:
virtual std::string ArchiveURI(std::string File) const;
virtual std::string Describe(bool Short = false) const;
virtual bool Exists() const;
virtual unsigned long Size() const;
virtual std::string ArchiveURI(std::string File) const APT_OVERRIDE;
virtual std::string Describe(bool Short = false) const APT_OVERRIDE;
virtual bool Exists() const APT_OVERRIDE;
virtual unsigned long Size() const APT_OVERRIDE;
pkgIndexTargetFile(IndexTarget const &Target, bool const Trusted);
virtual ~pkgIndexTargetFile();

28
apt-pkg/install-progress.h

@ -72,21 +72,21 @@ namespace Progress {
explicit PackageManagerProgressFd(int progress_fd);
virtual ~PackageManagerProgressFd();
virtual void StartDpkg()