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. --- methods/connect.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'methods/connect.cc') diff --git a/methods/connect.cc b/methods/connect.cc index f3e199d0a..12847c594 100644 --- a/methods/connect.cc +++ b/methods/connect.cc @@ -85,7 +85,7 @@ static bool ConnectionAllowed(char const * const Service, std::string const &Hos /*}}}*/ // File Descriptor based Fd /*{{{*/ -struct FdFd : public MethodFd +struct FdFd final : public MethodFd { int fd = -1; int Fd() APT_OVERRIDE { return fd; } @@ -805,7 +805,7 @@ ResultState UnwrapSocks(std::string Host, int Port, URI Proxy, std::unique_ptr UnderlyingFd; gnutls_session_t session; -- cgit v1.2.3-70-g09d2