From f73593a4034d9eec0ec4466b8e173d4a4daece1f Mon Sep 17 00:00:00 2001 From: David Kalnischkies Date: Thu, 26 Dec 2024 19:41:53 +0000 Subject: Drop usage of macro APT_OVERRIDE for simple override We were rather inconsistent in using it and as our public headers contain deduction guides (a c++17 feature) it seems silly to try to hide a c++11 feature in a macro, so lets stop this charade and drop the macro and while we are changing all these lines lets apply [[nodiscard]] (another c++17 feature) and other suggestions from clang-tidy and formatting for a little more consistency. --- apt-pkg/indexcopy.h | 22 ++++++++++------------ 1 file changed, 10 insertions(+), 12 deletions(-) (limited to 'apt-pkg/indexcopy.h') diff --git a/apt-pkg/indexcopy.h b/apt-pkg/indexcopy.h index 5fcce20d0..d81bc092f 100644 --- a/apt-pkg/indexcopy.h +++ b/apt-pkg/indexcopy.h @@ -55,30 +55,28 @@ class APT_PUBLIC PackageCopy : public IndexCopy /*{{{*/ { void * const d; protected: - - 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";}; + bool GetFile(std::string &Filename, unsigned long long &Size) override; + bool RewriteEntry(FileFd &Target, std::string const &File) override; + const char *GetFileName() override { return "Packages"; } + const char *Type() override { return "Package"; } public: PackageCopy(); - virtual ~PackageCopy(); + ~PackageCopy() override; }; /*}}}*/ class APT_PUBLIC SourceCopy : public IndexCopy /*{{{*/ { void * const d; protected: - - 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";}; + bool GetFile(std::string &Filename, unsigned long long &Size) override; + bool RewriteEntry(FileFd &Target, std::string const &File) override; + const char *GetFileName() override { return "Sources"; } + const char *Type() override { return "Source"; }; public: SourceCopy(); - virtual ~SourceCopy(); + ~SourceCopy() override; }; /*}}}*/ class APT_PUBLIC TranslationsCopy /*{{{*/ -- cgit v1.2.3-70-g09d2