summaryrefslogtreecommitdiff
path: root/Source/Core/InputCommon/ControllerInterface
diff options
context:
space:
mode:
authorTillmann Karras <tilkax@gmail.com>2014-03-08 01:54:44 +0100
committerTillmann Karras <tilkax@gmail.com>2014-03-09 21:12:01 +0100
commitf28116b7da6aac6069084596dc4dbf866bdebfd8 (patch)
treee105ce4d1a55421d83c27797a896917d6031ee9c /Source/Core/InputCommon/ControllerInterface
parentc89f04a7c5256d92b75e9868df9af6cfb7050559 (diff)
clang-modernize -add-override
Diffstat (limited to 'Source/Core/InputCommon/ControllerInterface')
-rw-r--r--Source/Core/InputCommon/ControllerInterface/ControllerInterface.h8
-rw-r--r--Source/Core/InputCommon/ControllerInterface/Device.h8
-rw-r--r--Source/Core/InputCommon/ControllerInterface/SDL/SDL.h16
-rw-r--r--Source/Core/InputCommon/ControllerInterface/Xlib/XInput2.h30
-rw-r--r--Source/Core/InputCommon/ControllerInterface/Xlib/Xlib.h24
5 files changed, 43 insertions, 43 deletions
diff --git a/Source/Core/InputCommon/ControllerInterface/ControllerInterface.h b/Source/Core/InputCommon/ControllerInterface/ControllerInterface.h
index affabafc9b..898fd954fb 100644
--- a/Source/Core/InputCommon/ControllerInterface/ControllerInterface.h
+++ b/Source/Core/InputCommon/ControllerInterface/ControllerInterface.h
@@ -96,8 +96,8 @@ public:
{
public:
InputReference() : ControlReference(true) {}
- ControlState State(const ControlState state);
- Device::Control* Detect(const unsigned int ms, Device* const device);
+ ControlState State(const ControlState state) override;
+ Device::Control* Detect(const unsigned int ms, Device* const device) override;
};
//
@@ -109,8 +109,8 @@ public:
{
public:
OutputReference() : ControlReference(false) {}
- ControlState State(const ControlState state);
- Device::Control* Detect(const unsigned int ms, Device* const device);
+ ControlState State(const ControlState state) override;
+ Device::Control* Detect(const unsigned int ms, Device* const device) override;
};
ControllerInterface() : m_is_init(false), m_hwnd(NULL) {}
diff --git a/Source/Core/InputCommon/ControllerInterface/Device.h b/Source/Core/InputCommon/ControllerInterface/Device.h
index 8b4dc65fbb..43f1b738c7 100644
--- a/Source/Core/InputCommon/ControllerInterface/Device.h
+++ b/Source/Core/InputCommon/ControllerInterface/Device.h
@@ -59,7 +59,7 @@ public:
virtual ControlState GetState() const = 0;
- Input* ToInput() { return this; }
+ Input* ToInput() override { return this; }
};
//
@@ -74,7 +74,7 @@ public:
virtual void SetState(ControlState state) = 0;
- Output* ToOutput() { return this; }
+ Output* ToOutput() override { return this; }
};
virtual ~Device();
@@ -104,12 +104,12 @@ protected:
: m_low(*low), m_high(*high)
{}
- ControlState GetState() const
+ ControlState GetState() const override
{
return (1 + m_high.GetState() - m_low.GetState()) / 2;
}
- std::string GetName() const
+ std::string GetName() const override
{
return m_low.GetName() + *m_high.GetName().rbegin();
}
diff --git a/Source/Core/InputCommon/ControllerInterface/SDL/SDL.h b/Source/Core/InputCommon/ControllerInterface/SDL/SDL.h
index 15f39998b9..76fc028ec9 100644
--- a/Source/Core/InputCommon/ControllerInterface/SDL/SDL.h
+++ b/Source/Core/InputCommon/ControllerInterface/SDL/SDL.h
@@ -83,9 +83,9 @@ private:
class ConstantEffect : public Output
{
public:
- std::string GetName() const;
+ std::string GetName() const override;
ConstantEffect(EffectIDState& effect) : m_effect(effect) {}
- void SetState(ControlState state);
+ void SetState(ControlState state) override;
private:
EffectIDState& m_effect;
};
@@ -93,9 +93,9 @@ private:
class RampEffect : public Output
{
public:
- std::string GetName() const;
+ std::string GetName() const override;
RampEffect(EffectIDState& effect) : m_effect(effect) {}
- void SetState(ControlState state);
+ void SetState(ControlState state) override;
private:
EffectIDState& m_effect;
};
@@ -103,9 +103,9 @@ private:
class SineEffect : public Output
{
public:
- std::string GetName() const;
+ std::string GetName() const override;
SineEffect(EffectIDState& effect) : m_effect(effect) {}
- void SetState(ControlState state);
+ void SetState(ControlState state) override;
private:
EffectIDState& m_effect;
};
@@ -125,9 +125,9 @@ private:
class TriangleEffect : public Output
{
public:
- std::string GetName() const;
+ std::string GetName() const override;
TriangleEffect(EffectIDState& effect) : m_effect(effect) {}
- void SetState(ControlState state);
+ void SetState(ControlState state) override;
private:
EffectIDState& m_effect;
};
diff --git a/Source/Core/InputCommon/ControllerInterface/Xlib/XInput2.h b/Source/Core/InputCommon/ControllerInterface/Xlib/XInput2.h
index 2714b70221..167f9af113 100644
--- a/Source/Core/InputCommon/ControllerInterface/Xlib/XInput2.h
+++ b/Source/Core/InputCommon/ControllerInterface/Xlib/XInput2.h
@@ -39,9 +39,9 @@ private:
{
friend class KeyboardMouse;
public:
- std::string GetName() const { return m_keyname; }
+ std::string GetName() const override { return m_keyname; }
Key(Display* display, KeyCode keycode, const char* keyboard);
- ControlState GetState() const;
+ ControlState GetState() const override;
private:
std::string m_keyname;
@@ -53,9 +53,9 @@ private:
class Button : public Input
{
public:
- std::string GetName() const { return name; }
+ std::string GetName() const override { return name; }
Button(unsigned int index, unsigned int& buttons);
- ControlState GetState() const;
+ ControlState GetState() const override;
private:
const unsigned int& m_buttons;
@@ -66,10 +66,10 @@ private:
class Cursor : public Input
{
public:
- std::string GetName() const { return name; }
- bool IsDetectable() { return false; }
+ std::string GetName() const override { return name; }
+ bool IsDetectable() override { return false; }
Cursor(u8 index, bool positive, const float& cursor);
- ControlState GetState() const;
+ ControlState GetState() const override;
private:
const float& m_cursor;
@@ -81,10 +81,10 @@ private:
class Axis : public Input
{
public:
- std::string GetName() const { return name; }
- bool IsDetectable() { return false; }
+ std::string GetName() const override { return name; }
+ bool IsDetectable() override { return false; }
Axis(u8 index, bool positive, const float& axis);
- ControlState GetState() const;
+ ControlState GetState() const override;
private:
const float& m_axis;
@@ -98,15 +98,15 @@ private:
void UpdateCursor();
public:
- bool UpdateInput();
- bool UpdateOutput();
+ bool UpdateInput() override;
+ bool UpdateOutput() override;
KeyboardMouse(Window window, int opcode, int pointer_deviceid, int keyboard_deviceid);
~KeyboardMouse();
- 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:
Window m_window;
diff --git a/Source/Core/InputCommon/ControllerInterface/Xlib/Xlib.h b/Source/Core/InputCommon/ControllerInterface/Xlib/Xlib.h
index 9c506f67fe..237b3a484e 100644
--- a/Source/Core/InputCommon/ControllerInterface/Xlib/Xlib.h
+++ b/Source/Core/InputCommon/ControllerInterface/Xlib/Xlib.h
@@ -30,9 +30,9 @@ private:
{
friend class KeyboardMouse;
public:
- std::string GetName() const;
+ std::string GetName() const override;
Key(Display* display, KeyCode keycode, const char* keyboard);
- ControlState GetState() const;
+ ControlState GetState() const override;
private:
std::string m_keyname;
@@ -44,10 +44,10 @@ private:
class Button : public Input
{
public:
- std::string GetName() const;
+ std::string GetName() const override;
Button(unsigned int index, unsigned int& buttons)
: m_buttons(buttons), m_index(index) {}
- ControlState GetState() const;
+ ControlState GetState() const override;
private:
const unsigned int& m_buttons;
@@ -57,11 +57,11 @@ private:
class Cursor : public Input
{
public:
- std::string GetName() const;
- bool IsDetectable() { return false; }
+ std::string GetName() const override;
+ bool IsDetectable() override { return false; }
Cursor(u8 index, bool positive, const float& cursor)
: m_cursor(cursor), m_index(index), m_positive(positive) {}
- ControlState GetState() const;
+ ControlState GetState() const override;
private:
const float& m_cursor;
@@ -70,15 +70,15 @@ private:
};
public:
- bool UpdateInput();
- bool UpdateOutput();
+ bool UpdateInput() override;
+ bool UpdateOutput() override;
KeyboardMouse(Window window);
~KeyboardMouse();
- 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:
Window m_window;