From c3332604fa2e8dd7b41d8f28883fe3606261db32 Mon Sep 17 00:00:00 2001 From: Lioncash Date: Thu, 17 Sep 2015 15:13:41 -0400 Subject: [PATCH] ControllerInterface: Fix -Winconsistent-missing-override warnings on OSX --- .../ForceFeedback/ForceFeedbackDevice.h | 2 +- .../ControllerInterface/OSX/OSXJoystick.h | 20 ++++++++++--------- .../ControllerInterface/OSX/OSXKeyboard.h | 14 ++++++------- 3 files changed, 19 insertions(+), 17 deletions(-) diff --git a/Source/Core/InputCommon/ControllerInterface/ForceFeedback/ForceFeedbackDevice.h b/Source/Core/InputCommon/ControllerInterface/ForceFeedback/ForceFeedbackDevice.h index 57364bd160..f49198f037 100644 --- a/Source/Core/InputCommon/ControllerInterface/ForceFeedback/ForceFeedbackDevice.h +++ b/Source/Core/InputCommon/ControllerInterface/ForceFeedback/ForceFeedbackDevice.h @@ -33,7 +33,7 @@ private: ~Force(); std::string GetName() const override; - void SetState(ControlState state); + void SetState(ControlState state) override; void Update(); void Stop(); private: diff --git a/Source/Core/InputCommon/ControllerInterface/OSX/OSXJoystick.h b/Source/Core/InputCommon/ControllerInterface/OSX/OSXJoystick.h index c0fdec5537..d0ed715130 100644 --- a/Source/Core/InputCommon/ControllerInterface/OSX/OSXJoystick.h +++ b/Source/Core/InputCommon/ControllerInterface/OSX/OSXJoystick.h @@ -20,10 +20,10 @@ private: class Button : public Input { public: - std::string GetName() const; Button(IOHIDElementRef element, IOHIDDeviceRef device) : m_element(element), m_device(device) {} - ControlState GetState() const; + std::string GetName() const override; + ControlState GetState() const override; private: const IOHIDElementRef m_element; const IOHIDDeviceRef m_device; @@ -37,9 +37,10 @@ private: positive = 0, negative }; - std::string GetName() const; + Axis(IOHIDElementRef element, IOHIDDeviceRef device, direction dir); - ControlState GetState() const; + std::string GetName() const override; + ControlState GetState() const override; private: const IOHIDElementRef m_element; @@ -60,9 +61,10 @@ private: down, left }; - std::string GetName() const; + Hat(IOHIDElementRef element, IOHIDDeviceRef device, direction dir); - ControlState GetState() const; + std::string GetName() const override; + ControlState GetState() const override; private: const IOHIDElementRef m_element; @@ -75,9 +77,9 @@ public: Joystick(IOHIDDeviceRef device, std::string name, int index); ~Joystick(); - std::string GetName() const; - std::string GetSource() const; - int GetId() const; + std::string GetName() const override; + std::string GetSource() const override; + int GetId() const override; private: const IOHIDDeviceRef m_device; diff --git a/Source/Core/InputCommon/ControllerInterface/OSX/OSXKeyboard.h b/Source/Core/InputCommon/ControllerInterface/OSX/OSXKeyboard.h index 4be67a503c..d404f90684 100644 --- a/Source/Core/InputCommon/ControllerInterface/OSX/OSXKeyboard.h +++ b/Source/Core/InputCommon/ControllerInterface/OSX/OSXKeyboard.h @@ -19,9 +19,9 @@ private: class Key : public Input { public: - std::string GetName() const; Key(IOHIDElementRef element, IOHIDDeviceRef device); - ControlState GetState() const; + std::string GetName() const override; + ControlState GetState() const override; private: const IOHIDElementRef m_element; const IOHIDDeviceRef m_device; @@ -31,10 +31,10 @@ private: class Cursor : public Input { public: - std::string GetName() const; - bool IsDetectable() { return false; } Cursor(u8 index, const float& axis, const bool positive) : m_axis(axis), m_index(index), m_positive(positive) {} - ControlState GetState() const; + std::string GetName() const override; + bool IsDetectable() override { return false; } + ControlState GetState() const override; private: const float& m_axis; const u8 m_index; @@ -44,9 +44,9 @@ private: class Button : public Input { public: - std::string GetName() const; Button(u8 index, const unsigned char& button) : m_button(button), m_index(index) {} - ControlState GetState() const; + std::string GetName() const override; + ControlState GetState() const override; private: const unsigned char& m_button; const u8 m_index;