diff options
author | Andrew Kaster <akaster@serenityos.org> | 2022-01-03 01:34:29 -0700 |
---|---|---|
committer | Brian Gianforcaro <b.gianfo@gmail.com> | 2022-01-04 07:51:31 +0000 |
commit | c8cfd6661adbf37e34f1b629e2baf641ec7cb8ee (patch) | |
tree | 4be9bb52ed2fc71010106996a4211b4570a2d272 /Userland/Applications/SoundPlayer/Common.h | |
parent | ed3cb888985d95be8967f41f9e604f280fcc9496 (diff) | |
download | serenity-c8cfd6661adbf37e34f1b629e2baf641ec7cb8ee.zip |
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.
Diffstat (limited to 'Userland/Applications/SoundPlayer/Common.h')
-rw-r--r-- | Userland/Applications/SoundPlayer/Common.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Userland/Applications/SoundPlayer/Common.h b/Userland/Applications/SoundPlayer/Common.h index 25f03efa07..353fd29bd1 100644 --- a/Userland/Applications/SoundPlayer/Common.h +++ b/Userland/Applications/SoundPlayer/Common.h @@ -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; } |