summaryrefslogtreecommitdiff
path: root/apt-pkg/install-progress.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/install-progress.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/install-progress.h')
-rw-r--r--apt-pkg/install-progress.h95
1 files changed, 47 insertions, 48 deletions
diff --git a/apt-pkg/install-progress.h b/apt-pkg/install-progress.h
index db060b3bc..499ac238f 100644
--- a/apt-pkg/install-progress.h
+++ b/apt-pkg/install-progress.h
@@ -70,24 +70,23 @@ namespace Progress {
public:
explicit PackageManagerProgressFd(int progress_fd);
- virtual ~PackageManagerProgressFd();
-
- virtual void StartDpkg() APT_OVERRIDE;
- virtual void Stop() APT_OVERRIDE;
-
- virtual bool StatusChanged(std::string PackageName,
- unsigned int StepsDone,
- unsigned int TotalSteps,
- std::string HumanReadableAction) APT_OVERRIDE;
- virtual void Error(std::string PackageName,
- unsigned int StepsDone,
- unsigned int TotalSteps,
- std::string ErrorMessage) APT_OVERRIDE;
- virtual void ConffilePrompt(std::string PackageName,
- unsigned int StepsDone,
- unsigned int TotalSteps,
- std::string ConfMessage) APT_OVERRIDE;
-
+ ~PackageManagerProgressFd() override;
+
+ void StartDpkg() override;
+ void Stop() override;
+
+ bool StatusChanged(std::string PackageName,
+ unsigned int StepsDone,
+ unsigned int TotalSteps,
+ std::string HumanReadableAction) override;
+ void Error(std::string PackageName,
+ unsigned int StepsDone,
+ unsigned int TotalSteps,
+ std::string ErrorMessage) override;
+ void ConffilePrompt(std::string PackageName,
+ unsigned int StepsDone,
+ unsigned int TotalSteps,
+ std::string ConfMessage) override;
};
class APT_PUBLIC PackageManagerProgressDeb822Fd : public PackageManager
@@ -101,23 +100,23 @@ namespace Progress {
public:
explicit PackageManagerProgressDeb822Fd(int progress_fd);
- virtual ~PackageManagerProgressDeb822Fd();
-
- virtual void StartDpkg() APT_OVERRIDE;
- virtual void Stop() APT_OVERRIDE;
-
- virtual bool StatusChanged(std::string PackageName,
- unsigned int StepsDone,
- unsigned int TotalSteps,
- std::string HumanReadableAction) APT_OVERRIDE;
- virtual void Error(std::string PackageName,
- unsigned int StepsDone,
- unsigned int TotalSteps,
- std::string ErrorMessage) APT_OVERRIDE;
- virtual void ConffilePrompt(std::string PackageName,
- unsigned int StepsDone,
- unsigned int TotalSteps,
- std::string ConfMessage) APT_OVERRIDE;
+ ~PackageManagerProgressDeb822Fd() override;
+
+ void StartDpkg() override;
+ void Stop() override;
+
+ bool StatusChanged(std::string PackageName,
+ unsigned int StepsDone,
+ unsigned int TotalSteps,
+ std::string HumanReadableAction) override;
+ void Error(std::string PackageName,
+ unsigned int StepsDone,
+ unsigned int TotalSteps,
+ std::string ErrorMessage) override;
+ void ConffilePrompt(std::string PackageName,
+ unsigned int StepsDone,
+ unsigned int TotalSteps,
+ std::string ConfMessage) override;
};
class APT_PUBLIC PackageManagerFancy : public PackageManager
@@ -146,14 +145,14 @@ namespace Progress {
public:
PackageManagerFancy();
- virtual ~PackageManagerFancy();
- virtual void Pulse() APT_OVERRIDE;
- virtual void Start(int child_pty=-1) APT_OVERRIDE;
- virtual void Stop() APT_OVERRIDE;
- virtual bool StatusChanged(std::string PackageName,
- unsigned int StepsDone,
- unsigned int TotalSteps,
- std::string HumanReadableAction) APT_OVERRIDE;
+ ~PackageManagerFancy() override;
+ void Pulse() override;
+ void Start(int child_pty = -1) override;
+ void Stop() override;
+ bool StatusChanged(std::string PackageName,
+ unsigned int StepsDone,
+ unsigned int TotalSteps,
+ std::string HumanReadableAction) override;
// return a progress bar of the given size for the given progress
// percent between 0.0 and 1.0 in the form "[####...]"
@@ -164,13 +163,13 @@ namespace Progress {
{
void * const d;
public:
- virtual bool StatusChanged(std::string PackageName,
- unsigned int StepsDone,
- unsigned int TotalSteps,
- std::string HumanReadableAction) APT_OVERRIDE;
+ bool StatusChanged(std::string PackageName,
+ unsigned int StepsDone,
+ unsigned int TotalSteps,
+ std::string HumanReadableAction) override;
PackageManagerText();
- virtual ~PackageManagerText();
+ ~PackageManagerText() override;
};