diff options
| author | Jordan Woyak <jordan.woyak@gmail.com> | 2025-06-07 17:55:14 -0500 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-06-07 17:55:14 -0500 |
| commit | 65f3ba70f5a88a25eeb7fef143b8e46093e30a7a (patch) | |
| tree | a550dbcced888ddc1fe57bbe575373d9c0fb3f46 /Source/Core/InputCommon | |
| parent | ec52a7496723f9b59c37003ac0296e6a2f7e911c (diff) | |
| parent | f240e20e3f8250d279255fe48ba6ab351b581679 (diff) | |
Merge pull request #13522 from tygyh/Enforce-overriding-destructor-style-Core&UnitTests
Core & UnitTests: Make overriding explicit and remove redundant virtual specifiers on overriding destructors
Diffstat (limited to 'Source/Core/InputCommon')
15 files changed, 28 insertions, 31 deletions
diff --git a/Source/Core/InputCommon/ControllerEmu/ControlGroup/AnalogStick.h b/Source/Core/InputCommon/ControllerEmu/ControlGroup/AnalogStick.h index 377e63251d..09beffe728 100644 --- a/Source/Core/InputCommon/ControllerEmu/ControlGroup/AnalogStick.h +++ b/Source/Core/InputCommon/ControllerEmu/ControlGroup/AnalogStick.h @@ -17,7 +17,7 @@ public: AnalogStick(const char* name, std::unique_ptr<StickGate>&& stick_gate); AnalogStick(const char* name, const char* ui_name, std::unique_ptr<StickGate>&& stick_gate); - ReshapeData GetReshapableState(bool adjusted) const final override; + ReshapeData GetReshapableState(bool adjusted) const final; ControlState GetGateRadiusAtAngle(double ang) const override; StateData GetState() const; diff --git a/Source/Core/InputCommon/ControllerEmu/ControlGroup/Cursor.h b/Source/Core/InputCommon/ControllerEmu/ControlGroup/Cursor.h index 7b2e5f581c..a59826124a 100644 --- a/Source/Core/InputCommon/ControllerEmu/ControlGroup/Cursor.h +++ b/Source/Core/InputCommon/ControllerEmu/ControlGroup/Cursor.h @@ -24,7 +24,7 @@ public: Cursor(std::string name, std::string ui_name); - ReshapeData GetReshapableState(bool adjusted) const final override; + ReshapeData GetReshapableState(bool adjusted) const final; ControlState GetGateRadiusAtAngle(double ang) const override; // Modifies the state diff --git a/Source/Core/InputCommon/ControllerEmu/ControlGroup/Force.h b/Source/Core/InputCommon/ControllerEmu/ControlGroup/Force.h index 8815cffa73..abe02a44d4 100644 --- a/Source/Core/InputCommon/ControllerEmu/ControlGroup/Force.h +++ b/Source/Core/InputCommon/ControllerEmu/ControlGroup/Force.h @@ -18,10 +18,10 @@ public: explicit Force(const std::string& name); - ReshapeData GetReshapableState(bool adjusted) const final override; - ControlState GetGateRadiusAtAngle(double ang) const final override; + ReshapeData GetReshapableState(bool adjusted) const final; + ControlState GetGateRadiusAtAngle(double ang) const final; - ControlState GetDefaultInputRadiusAtAngle(double angle) const final override; + ControlState GetDefaultInputRadiusAtAngle(double angle) const final; StateData GetState(bool adjusted = true) const; diff --git a/Source/Core/InputCommon/ControllerEmu/ControlGroup/Tilt.h b/Source/Core/InputCommon/ControllerEmu/ControlGroup/Tilt.h index b9de77d712..69cfd7d202 100644 --- a/Source/Core/InputCommon/ControllerEmu/ControlGroup/Tilt.h +++ b/Source/Core/InputCommon/ControllerEmu/ControlGroup/Tilt.h @@ -18,12 +18,12 @@ public: explicit Tilt(const std::string& name); - ReshapeData GetReshapableState(bool adjusted) const final override; - ControlState GetGateRadiusAtAngle(double angle) const final override; + ReshapeData GetReshapableState(bool adjusted) const final; + ControlState GetGateRadiusAtAngle(double angle) const final; // Tilt is using the gate radius to adjust the tilt angle so we must provide an unadjusted value // for the default input radius. - ControlState GetDefaultInputRadiusAtAngle(double angle) const final override; + ControlState GetDefaultInputRadiusAtAngle(double angle) const final; StateData GetState() const; diff --git a/Source/Core/InputCommon/ControllerEmu/ControllerEmu.h b/Source/Core/InputCommon/ControllerEmu/ControllerEmu.h index 0c6ff27cd8..466906da04 100644 --- a/Source/Core/InputCommon/ControllerEmu/ControllerEmu.h +++ b/Source/Core/InputCommon/ControllerEmu/ControllerEmu.h @@ -235,7 +235,7 @@ protected: class EmulatedController : public ControlGroupContainer { public: - virtual ~EmulatedController(); + ~EmulatedController() override; virtual InputConfig* GetConfig() const = 0; diff --git a/Source/Core/InputCommon/ControllerEmu/StickGate.h b/Source/Core/InputCommon/ControllerEmu/StickGate.h index 496621492e..919cc08815 100644 --- a/Source/Core/InputCommon/ControllerEmu/StickGate.h +++ b/Source/Core/InputCommon/ControllerEmu/StickGate.h @@ -36,8 +36,8 @@ class OctagonStickGate : public StickGate public: // Radius of circumscribed circle explicit OctagonStickGate(ControlState radius); - ControlState GetRadiusAtAngle(double ang) const override final; - std::optional<u32> GetIdealCalibrationSampleCount() const override final; + ControlState GetRadiusAtAngle(double ang) const final; + std::optional<u32> GetIdealCalibrationSampleCount() const final; private: const ControlState m_radius; @@ -48,8 +48,8 @@ class RoundStickGate : public StickGate { public: explicit RoundStickGate(ControlState radius); - ControlState GetRadiusAtAngle(double ang) const override final; - std::optional<u32> GetIdealCalibrationSampleCount() const override final; + ControlState GetRadiusAtAngle(double ang) const final; + std::optional<u32> GetIdealCalibrationSampleCount() const final; private: const ControlState m_radius; @@ -60,8 +60,8 @@ class SquareStickGate : public StickGate { public: explicit SquareStickGate(ControlState half_width); - ControlState GetRadiusAtAngle(double ang) const override final; - std::optional<u32> GetIdealCalibrationSampleCount() const override final; + ControlState GetRadiusAtAngle(double ang) const final; + std::optional<u32> GetIdealCalibrationSampleCount() const final; private: const ControlState m_half_width; diff --git a/Source/Core/InputCommon/ControllerInterface/CoreDevice.h b/Source/Core/InputCommon/ControllerInterface/CoreDevice.h index f30dd4f405..95f9f5b88e 100644 --- a/Source/Core/InputCommon/ControllerInterface/CoreDevice.h +++ b/Source/Core/InputCommon/ControllerInterface/CoreDevice.h @@ -117,7 +117,7 @@ public: class Output : public Control { public: - virtual ~Output() = default; + ~Output() override = default; virtual void SetState(ControlState state) = 0; Output* ToOutput() override { return this; } }; diff --git a/Source/Core/InputCommon/ControllerInterface/DInput/DInputJoystick.h b/Source/Core/InputCommon/ControllerInterface/DInput/DInputJoystick.h index cb73f373f8..bf1f9aa91b 100644 --- a/Source/Core/InputCommon/ControllerInterface/DInput/DInputJoystick.h +++ b/Source/Core/InputCommon/ControllerInterface/DInput/DInputJoystick.h @@ -60,13 +60,13 @@ public: Core::DeviceRemoval UpdateInput() override; Joystick(const LPDIRECTINPUTDEVICE8 device); - ~Joystick(); + ~Joystick() override; std::string GetName() const override; std::string GetSource() const override; int GetSortPriority() const override { return -3; } - bool IsValid() const final override; + bool IsValid() const final; private: const LPDIRECTINPUTDEVICE8 m_device; diff --git a/Source/Core/InputCommon/ControllerInterface/DInput/DInputKeyboardMouse.h b/Source/Core/InputCommon/ControllerInterface/DInput/DInputKeyboardMouse.h index e7187849f6..67721e3301 100644 --- a/Source/Core/InputCommon/ControllerInterface/DInput/DInputKeyboardMouse.h +++ b/Source/Core/InputCommon/ControllerInterface/DInput/DInputKeyboardMouse.h @@ -97,7 +97,7 @@ public: Core::DeviceRemoval UpdateInput() override; KeyboardMouse(const LPDIRECTINPUTDEVICE8 kb_device, const LPDIRECTINPUTDEVICE8 mo_device); - ~KeyboardMouse(); + ~KeyboardMouse() override; std::string GetName() const override; std::string GetSource() const override; diff --git a/Source/Core/InputCommon/ControllerInterface/DualShockUDPClient/DualShockUDPClient.cpp b/Source/Core/InputCommon/ControllerInterface/DualShockUDPClient/DualShockUDPClient.cpp index ea24800762..cac67e1b8a 100644 --- a/Source/Core/InputCommon/ControllerInterface/DualShockUDPClient/DualShockUDPClient.cpp +++ b/Source/Core/InputCommon/ControllerInterface/DualShockUDPClient/DualShockUDPClient.cpp @@ -71,11 +71,8 @@ private: : m_name(name), m_input(input), m_range(range), m_offset(offset) { } - std::string GetName() const final override { return m_name; } - ControlState GetState() const final override - { - return (ControlState(m_input) + m_offset) / m_range; - } + std::string GetName() const final { return m_name; } + ControlState GetState() const final { return (ControlState(m_input) + m_offset) / m_range; } private: const char* m_name; @@ -203,7 +200,7 @@ class InputBackend final : public ciface::InputBackend { public: InputBackend(ControllerInterface* controller_interface); - ~InputBackend(); + ~InputBackend() override; void PopulateDevices() override; private: diff --git a/Source/Core/InputCommon/ControllerInterface/SDL/SDL.cpp b/Source/Core/InputCommon/ControllerInterface/SDL/SDL.cpp index 07a38b0289..efa3bfa997 100644 --- a/Source/Core/InputCommon/ControllerInterface/SDL/SDL.cpp +++ b/Source/Core/InputCommon/ControllerInterface/SDL/SDL.cpp @@ -26,7 +26,7 @@ class InputBackend final : public ciface::InputBackend { public: InputBackend(ControllerInterface* controller_interface); - ~InputBackend(); + ~InputBackend() override; void PopulateDevices() override; void UpdateInput(std::vector<std::weak_ptr<ciface::Core::Device>>& devices_to_remove) override; diff --git a/Source/Core/InputCommon/ControllerInterface/SteamDeck/SteamDeck.cpp b/Source/Core/InputCommon/ControllerInterface/SteamDeck/SteamDeck.cpp index 2ffd741d01..f8615d138b 100644 --- a/Source/Core/InputCommon/ControllerInterface/SteamDeck/SteamDeck.cpp +++ b/Source/Core/InputCommon/ControllerInterface/SteamDeck/SteamDeck.cpp @@ -93,8 +93,8 @@ private: : m_name(name), m_input(input), m_range(range) { } - std::string GetName() const final override { return m_name; } - ControlState GetState() const final override { return ControlState(m_input) / m_range; } + std::string GetName() const final { return m_name; } + ControlState GetState() const final { return ControlState(m_input) / m_range; } private: const char* m_name; diff --git a/Source/Core/InputCommon/ControllerInterface/Wiimote/WiimoteController.cpp b/Source/Core/InputCommon/ControllerInterface/Wiimote/WiimoteController.cpp index c4e5fe028f..9b5fe3c1e9 100644 --- a/Source/Core/InputCommon/ControllerInterface/Wiimote/WiimoteController.cpp +++ b/Source/Core/InputCommon/ControllerInterface/Wiimote/WiimoteController.cpp @@ -51,7 +51,7 @@ public: std::string GetName() const override { return m_name; } - ControlState GetState() const final override { return ControlState(m_value) / m_extent; } + ControlState GetState() const final { return ControlState(m_value) / m_extent; } protected: const T& m_value; diff --git a/Source/Core/InputCommon/ControllerInterface/Wiimote/WiimoteController.h b/Source/Core/InputCommon/ControllerInterface/Wiimote/WiimoteController.h index bc60a1405e..c09a8da5db 100644 --- a/Source/Core/InputCommon/ControllerInterface/Wiimote/WiimoteController.h +++ b/Source/Core/InputCommon/ControllerInterface/Wiimote/WiimoteController.h @@ -29,7 +29,7 @@ class Device final : public Core::Device { public: Device(std::unique_ptr<WiimoteReal::Wiimote> wiimote); - ~Device(); + ~Device() override; std::string GetName() const override; std::string GetSource() const override; diff --git a/Source/Core/InputCommon/ControllerInterface/Win32/Win32.cpp b/Source/Core/InputCommon/ControllerInterface/Win32/Win32.cpp index 36b847aa91..2e69fc80e6 100644 --- a/Source/Core/InputCommon/ControllerInterface/Win32/Win32.cpp +++ b/Source/Core/InputCommon/ControllerInterface/Win32/Win32.cpp @@ -31,7 +31,7 @@ class InputBackend final : public ciface::InputBackend { public: InputBackend(ControllerInterface* controller_interface); - ~InputBackend(); + ~InputBackend() override; void PopulateDevices() override; void HandleWindowChange() override; |
