diff options
| author | David Kalnischkies <david@kalnischkies.de> | 2024-12-26 19:41:53 +0000 |
|---|---|---|
| committer | David Kalnischkies <david@kalnischkies.de> | 2025-01-05 22:16:08 +0000 |
| commit | f73593a4034d9eec0ec4466b8e173d4a4daece1f (patch) | |
| tree | 9cab47b9426e3e9fff80682b86f8449e3d9c9b53 /apt-private | |
| parent | 427f95cedadb5323d35e5174d4592cbdd9c602f4 (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-private')
| -rw-r--r-- | apt-private/acqprogress.h | 21 | ||||
| -rw-r--r-- | apt-private/private-cacheset.h | 16 | ||||
| -rw-r--r-- | apt-private/private-download.cc | 2 | ||||
| -rw-r--r-- | apt-private/private-list.cc | 4 |
4 files changed, 21 insertions, 22 deletions
diff --git a/apt-private/acqprogress.h b/apt-private/acqprogress.h index b4015861c..a26047f1c 100644 --- a/apt-private/acqprogress.h +++ b/apt-private/acqprogress.h @@ -30,17 +30,16 @@ class APT_PUBLIC AcqTextStatus : public pkgAcquireStatus APT_HIDDEN void AssignItemID(pkgAcquire::ItemDesc &Itm); public: - - virtual bool ReleaseInfoChanges(metaIndex const * const LastRelease, metaIndex const * const CurrentRelease, std::vector<ReleaseInfoChange> &&Changes) APT_OVERRIDE; - virtual bool MediaChange(std::string Media,std::string Drive) APT_OVERRIDE; - virtual void IMSHit(pkgAcquire::ItemDesc &Itm) APT_OVERRIDE; - virtual void Fetch(pkgAcquire::ItemDesc &Itm) APT_OVERRIDE; - virtual void Done(pkgAcquire::ItemDesc &Itm) APT_OVERRIDE; - virtual void Fail(pkgAcquire::ItemDesc &Itm) APT_OVERRIDE; - virtual void Start() APT_OVERRIDE; - virtual void Stop() APT_OVERRIDE; - - bool Pulse(pkgAcquire *Owner) APT_OVERRIDE; + bool ReleaseInfoChanges(metaIndex const *LastRelease, metaIndex const *CurrentRelease, std::vector<ReleaseInfoChange> &&Changes) override; + bool MediaChange(std::string Media, std::string Drive) override; + void IMSHit(pkgAcquire::ItemDesc &Itm) override; + void Fetch(pkgAcquire::ItemDesc &Itm) override; + void Done(pkgAcquire::ItemDesc &Itm) override; + void Fail(pkgAcquire::ItemDesc &Itm) override; + void Start() override; + void Stop() override; + + bool Pulse(pkgAcquire *Owner) override; AcqTextStatus(std::ostream &out, unsigned int &ScreenWidth,unsigned int const Quiet); }; diff --git a/apt-private/private-cacheset.h b/apt-private/private-cacheset.h index cad8e4a00..887878004 100644 --- a/apt-private/private-cacheset.h +++ b/apt-private/private-cacheset.h @@ -86,9 +86,9 @@ class CacheSetHelperVirtuals: public APT::CacheSetHelper { public: APT::PackageSet virtualPkgs; - virtual pkgCache::VerIterator canNotGetVersion(enum CacheSetHelper::VerSelector const select, pkgCacheFile &Cache, pkgCache::PkgIterator const &Pkg) APT_OVERRIDE; - virtual void canNotFindVersion(enum CacheSetHelper::VerSelector const select, APT::VersionContainerInterface * vci, pkgCacheFile &Cache, pkgCache::PkgIterator const &Pkg) APT_OVERRIDE; - virtual pkgCache::PkgIterator canNotFindPkgName(pkgCacheFile &Cache, std::string const &str) APT_OVERRIDE; + pkgCache::VerIterator canNotGetVersion(enum CacheSetHelper::VerSelector select, pkgCacheFile &Cache, pkgCache::PkgIterator const &Pkg) override; + void canNotFindVersion(enum CacheSetHelper::VerSelector select, APT::VersionContainerInterface *vci, pkgCacheFile &Cache, pkgCache::PkgIterator const &Pkg) override; + pkgCache::PkgIterator canNotFindPkgName(pkgCacheFile &Cache, std::string const &str) override; CacheSetHelperVirtuals(bool const ShowErrors = true, GlobalError::MsgType const &ErrorType = GlobalError::NOTICE); }; @@ -108,20 +108,20 @@ public: explicit CacheSetHelperAPTGet(std::ostream &out); - virtual void showPackageSelection(pkgCache::PkgIterator const &Pkg, enum PkgSelector const select, std::string const &pattern) APT_OVERRIDE; + void showPackageSelection(pkgCache::PkgIterator const &Pkg, enum PkgSelector select, std::string const &pattern) override; void showTaskSelection(pkgCache::PkgIterator const &Pkg, std::string const &pattern); void showFnmatchSelection(pkgCache::PkgIterator const &Pkg, std::string const &pattern); void showRegExSelection(pkgCache::PkgIterator const &Pkg, std::string const &pattern); - void showVersionSelection(pkgCache::PkgIterator const &Pkg, pkgCache::VerIterator const &Ver, enum VerSelector const select, std::string const &pattern) APT_OVERRIDE; + void showVersionSelection(pkgCache::PkgIterator const &Pkg, pkgCache::VerIterator const &Ver, enum VerSelector select, std::string const &pattern) override; bool showVirtualPackageErrors(pkgCacheFile &Cache); - pkgCache::VerIterator canNotGetVersion(enum VerSelector const select, pkgCacheFile &Cache, pkgCache::PkgIterator const &Pkg) APT_OVERRIDE; - void canNotFindVersion(enum VerSelector const select, APT::VersionContainerInterface * const vci, pkgCacheFile &Cache, pkgCache::PkgIterator const &Pkg) APT_OVERRIDE; + pkgCache::VerIterator canNotGetVersion(enum VerSelector select, pkgCacheFile &Cache, pkgCache::PkgIterator const &Pkg) override; + void canNotFindVersion(enum VerSelector select, APT::VersionContainerInterface *vci, pkgCacheFile &Cache, pkgCache::PkgIterator const &Pkg) override; pkgCache::VerIterator canNotFindCandidateVer(pkgCacheFile &Cache, pkgCache::PkgIterator const &Pkg); pkgCache::VerIterator canNotFindNewestVer(pkgCacheFile &Cache, pkgCache::PkgIterator const &Pkg); pkgCache::VerIterator canNotFindVersionNumber(pkgCacheFile &Cache, pkgCache::PkgIterator const &Pkg, std::string const &verstr); pkgCache::VerIterator canNotFindVersionRelease(pkgCacheFile &Cache, pkgCache::PkgIterator const &Pkg, std::string const &verstr); - virtual pkgCache::PkgIterator canNotFindPkgName(pkgCacheFile &Cache, std::string const &str) APT_OVERRIDE; + pkgCache::PkgIterator canNotFindPkgName(pkgCacheFile &Cache, std::string const &str) override; APT::VersionSet tryVirtualPackage(pkgCacheFile &Cache, pkgCache::PkgIterator const &Pkg, CacheSetHelper::VerSelector const select); diff --git a/apt-private/private-download.cc b/apt-private/private-download.cc index 3f473b840..338ffae9b 100644 --- a/apt-private/private-download.cc +++ b/apt-private/private-download.cc @@ -357,7 +357,7 @@ bool DoDistClean(CommandLine &) class LogCleaner : public pkgArchiveCleaner { protected: - virtual void Erase(int const dirfd, char const * const File, std::string const &Pkg, std::string const &Ver,struct stat const &St) APT_OVERRIDE + void Erase(int const dirfd, char const * const File, std::string const &Pkg, std::string const &Ver,struct stat const &St) override { c1out << "Del " << Pkg << " " << Ver << " [" << SizeToStr(St.st_size) << "B]" << std::endl; diff --git a/apt-private/private-list.cc b/apt-private/private-list.cc index 6536c8df7..c5589aff0 100644 --- a/apt-private/private-list.cc +++ b/apt-private/private-list.cc @@ -63,12 +63,12 @@ class PackageNameMatcher : public Matcher filters.push_back(cachefilter); } } - virtual ~PackageNameMatcher() + ~PackageNameMatcher() override { for(J=filters.begin(); J != filters.end(); ++J) delete *J; } - virtual bool operator () (const pkgCache::PkgIterator &P) APT_OVERRIDE + bool operator()(const pkgCache::PkgIterator &P) override { for(J=filters.begin(); J != filters.end(); ++J) { |
