From a2167f126d643593740a85c10014ebf9d3f570de Mon Sep 17 00:00:00 2001 From: Daniel Bertalan Date: Mon, 12 May 2025 15:31:17 +0200 Subject: [PATCH] Everywhere: Fix trivial `-Wunnecessary-virtual-specifier` instances - `Threading::Thread` is not polymorphic, there is no need for a virtual destructor. - `HTMLAnchorElement::has_download_preference` isn't overridden by anything. This warning was introduced in llvm/llvm-project#131188. --- Libraries/LibThreading/Thread.h | 2 +- Libraries/LibWeb/HTML/HTMLAnchorElement.h | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/Libraries/LibThreading/Thread.h b/Libraries/LibThreading/Thread.h index c0a9a0a0af7..7501a4f7dfd 100644 --- a/Libraries/LibThreading/Thread.h +++ b/Libraries/LibThreading/Thread.h @@ -55,7 +55,7 @@ public: return adopt_nonnull_ref_or_enomem(new (nothrow) Thread(move(action), thread_name)); } - virtual ~Thread(); + ~Thread(); ErrorOr set_priority(int priority); ErrorOr get_priority() const; diff --git a/Libraries/LibWeb/HTML/HTMLAnchorElement.h b/Libraries/LibWeb/HTML/HTMLAnchorElement.h index f781dfe08b8..1a83a70bf7c 100644 --- a/Libraries/LibWeb/HTML/HTMLAnchorElement.h +++ b/Libraries/LibWeb/HTML/HTMLAnchorElement.h @@ -38,12 +38,14 @@ public: private: HTMLAnchorElement(DOM::Document&, DOM::QualifiedName); + bool has_download_preference() const; + virtual void initialize(JS::Realm&) override; virtual void visit_edges(Cell::Visitor&) override; + // ^DOM::EventTarget virtual bool has_activation_behavior() const override; virtual void activation_behavior(Web::DOM::Event const&) override; - virtual bool has_download_preference() const; // ^DOM::Element virtual void attribute_changed(FlyString const& name, Optional const& old_value, Optional const& value, Optional const& namespace_) override;