From 3b3028467ceccca0b73a8f53051c0fa4de313111 Mon Sep 17 00:00:00 2001 From: David Kalnischkies Date: Thu, 9 Jul 2015 00:35:40 +0200 Subject: 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 --- apt-pkg/indexcopy.h | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'apt-pkg/indexcopy.h') diff --git a/apt-pkg/indexcopy.h b/apt-pkg/indexcopy.h index 6eecad028..316672e1d 100644 --- a/apt-pkg/indexcopy.h +++ b/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(); -- cgit v1.2.3