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/http.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'methods/http.h') diff --git a/methods/http.h b/methods/http.h index cae579afe..5bfcbc8a2 100644 --- a/methods/http.h +++ b/methods/http.h @@ -90,7 +90,7 @@ class CircleBuf ~CircleBuf(); }; -struct HttpServerState: public ServerState +struct HttpServerState final : public ServerState { // This is the connection itself. Output is data FROM the server CircleBuf In; @@ -121,7 +121,7 @@ struct HttpServerState: public ServerState virtual ~HttpServerState() {Close();}; }; -class HttpMethod : public BaseHttpMethod +class HttpMethod final : public BaseHttpMethod { public: virtual void SendReq(FetchItem *Itm) APT_OVERRIDE; -- cgit v1.2.3-70-g09d2