mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 23:07:35 +00:00
Userland: Resolve -Woverloaded-virtual in LibGUI and SoundPlayer
Enable the warning project-wide. It catches when a non-virtual method creates an overload set with a virtual method. This might cause surprising overload resolution depending on how the method is invoked.
This commit is contained in:
parent
ed3cb88898
commit
c8cfd6661a
5 changed files with 7 additions and 8 deletions
|
@ -13,10 +13,10 @@ class AutoSlider final : public GUI::Slider {
|
|||
public:
|
||||
~AutoSlider() override = default;
|
||||
Function<void(int)> on_knob_released;
|
||||
void set_value(int value)
|
||||
virtual void set_value(int value, GUI::AllowCallback allow_callback = GUI::AllowCallback::Yes) override
|
||||
{
|
||||
if (!knob_dragging() && !mouse_is_down())
|
||||
GUI::Slider::set_value(value);
|
||||
GUI::Slider::set_value(value, allow_callback);
|
||||
}
|
||||
|
||||
bool mouse_is_down() const { return m_mouse_is_down; }
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue