From 8c760266c8c736bff62055c008ab74d78f3ed82a Mon Sep 17 00:00:00 2001 From: David Kalnischkies Date: Tue, 19 Nov 2024 22:42:44 +0000 Subject: Tag hidden acquire classes as final for devirtualization MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit gcc reports `warning: Declaring type ‘class X’ final would enable devirtualization of Y calls [-Wsuggest-final-types]`. Not that this would massively improve performance, but it shouldn't hurt telling the compiler what is obvious for a human. --- apt-pkg/acquire-item.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'apt-pkg/acquire-item.cc') diff --git a/apt-pkg/acquire-item.cc b/apt-pkg/acquire-item.cc index 12292eb28..73e9940ee 100644 --- a/apt-pkg/acquire-item.cc +++ b/apt-pkg/acquire-item.cc @@ -717,7 +717,7 @@ bool pkgAcqIndexDiffs::AcquireByHash() const } /*}}}*/ -class APT_HIDDEN NoActionItem : public pkgAcquire::Item /*{{{*/ +class APT_HIDDEN NoActionItem final : public pkgAcquire::Item /*{{{*/ /* The sole purpose of this class is having an item which does nothing to reach its done state to prevent cleanup deleting the mentioned file. Handy in cases in which we know we have the file already, like IMS-Hits. */ @@ -741,7 +741,7 @@ class APT_HIDDEN NoActionItem : public pkgAcquire::Item /*{{{*/ } }; /*}}}*/ -class APT_HIDDEN CleanupItem : public pkgAcqTransactionItem /*{{{*/ +class APT_HIDDEN CleanupItem final : public pkgAcqTransactionItem /*{{{*/ /* This class ensures that a file which was configured but isn't downloaded for various reasons isn't kept in an old version in the lists directory. In a way its the reverse of NoActionItem as it helps with removing files -- cgit v1.2.3-70-g09d2