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/contrib/progress.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'apt-pkg/contrib/progress.h') diff --git a/apt-pkg/contrib/progress.h b/apt-pkg/contrib/progress.h index f7fbc9ccf..427b1bd35 100644 --- a/apt-pkg/contrib/progress.h +++ b/apt-pkg/contrib/progress.h @@ -24,6 +24,7 @@ #include #include +#include #ifndef APT_8_CLEANER_HEADERS using std::string; @@ -74,12 +75,12 @@ class OpTextProgress : public OpProgress bool NoUpdate; bool NoDisplay; unsigned long LastLen; - virtual void Update(); + virtual void Update() APT_OVERRIDE; void Write(const char *S); public: - virtual void Done(); + virtual void Done() APT_OVERRIDE; OpTextProgress(bool NoUpdate = false) : NoUpdate(NoUpdate), NoDisplay(false), LastLen(0) {}; -- cgit v1.2.3