summaryrefslogtreecommitdiff
path: root/apt-pkg/deb/debfile.h
diff options
context:
space:
mode:
authorDavid Kalnischkies <david@kalnischkies.de>2024-12-26 19:41:53 +0000
committerDavid Kalnischkies <david@kalnischkies.de>2025-01-05 22:16:08 +0000
commitf73593a4034d9eec0ec4466b8e173d4a4daece1f (patch)
tree9cab47b9426e3e9fff80682b86f8449e3d9c9b53 /apt-pkg/deb/debfile.h
parent427f95cedadb5323d35e5174d4592cbdd9c602f4 (diff)
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.
Diffstat (limited to 'apt-pkg/deb/debfile.h')
-rw-r--r--apt-pkg/deb/debfile.h11
1 files changed, 5 insertions, 6 deletions
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; };
};
/*}}}*/