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/deb/debfile.h | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) (limited to 'apt-pkg/deb/debfile.h') diff --git a/apt-pkg/deb/debfile.h b/apt-pkg/deb/debfile.h index 48a75ae55..887ee7142 100644 --- a/apt-pkg/deb/debfile.h +++ b/apt-pkg/deb/debfile.h @@ -56,8 +56,7 @@ class APT_PUBLIC debDebFile class APT_PUBLIC debDebFile::ControlExtract : public pkgDirStream { public: - - virtual bool DoItem(Item &Itm,int &Fd) APT_OVERRIDE; + bool DoItem(Item &Itm, int &Fd) override; }; class APT_PUBLIC debDebFile::MemControlExtract : public pkgDirStream @@ -72,9 +71,9 @@ class APT_PUBLIC debDebFile::MemControlExtract : public pkgDirStream std::string Member; // Members from DirStream - virtual bool DoItem(Item &Itm,int &Fd) APT_OVERRIDE; - virtual bool Process(Item &Itm,const unsigned char *Data, - unsigned long long Size,unsigned long long Pos) APT_OVERRIDE; + bool DoItem(Item &Itm, int &Fd) override; + bool Process(Item &Itm, const unsigned char *Data, + unsigned long long Size, unsigned long long Pos) override; // Helpers bool Read(debDebFile &Deb); @@ -82,7 +81,7 @@ class APT_PUBLIC debDebFile::MemControlExtract : public pkgDirStream MemControlExtract() : IsControl(false), Control(0), Length(0), Member("control") {}; explicit MemControlExtract(std::string Member) : IsControl(false), Control(0), Length(0), Member(Member) {}; - ~MemControlExtract() {delete [] Control;}; + ~MemControlExtract() override { delete[] Control; }; }; /*}}}*/ -- cgit v1.2.3-70-g09d2