diff options
| author | comex <comexk@gmail.com> | 2013-10-29 01:34:26 -0400 |
|---|---|---|
| committer | comex <comexk@gmail.com> | 2013-11-03 20:54:05 -0500 |
| commit | 21610c2e54302f8d4e5cae0705abaf10e63a8b44 (patch) | |
| tree | 088b275a0d2752a4992c28b0eefeb4489a2296f5 /Source/Core/InputCommon/Src/ControllerInterface | |
| parent | c579637eafb9e9eb7f83711569254bd8da6d09d2 (diff) | |
Run code through clang-modernize -add-override to add 'override' decls.
Diffstat (limited to 'Source/Core/InputCommon/Src/ControllerInterface')
| -rw-r--r-- | Source/Core/InputCommon/Src/ControllerInterface/ExpressionParser.cpp | 24 | ||||
| -rw-r--r-- | Source/Core/InputCommon/Src/ControllerInterface/SDL/SDL.h | 22 |
2 files changed, 23 insertions, 23 deletions
diff --git a/Source/Core/InputCommon/Src/ControllerInterface/ExpressionParser.cpp b/Source/Core/InputCommon/Src/ControllerInterface/ExpressionParser.cpp index d91fbc587c..b313559907 100644 --- a/Source/Core/InputCommon/Src/ControllerInterface/ExpressionParser.cpp +++ b/Source/Core/InputCommon/Src/ControllerInterface/ExpressionParser.cpp @@ -222,22 +222,22 @@ public: ControlExpression(ControlQualifier qualifier_, Device::Control *control_) : qualifier(qualifier_), control(control_) {} - virtual ControlState GetValue() + virtual ControlState GetValue() override { return control->ToInput()->GetState(); } - virtual void SetValue(ControlState value) + virtual void SetValue(ControlState value) override { control->ToOutput()->SetState(value); } - virtual int CountNumControls() + virtual int CountNumControls() override { return 1; } - virtual operator std::string() + virtual operator std::string() override { return "`" + (std::string)qualifier + "`"; } @@ -257,7 +257,7 @@ public: delete rhs; } - virtual ControlState GetValue() + virtual ControlState GetValue() override { ControlState lhsValue = lhs->GetValue(); ControlState rhsValue = rhs->GetValue(); @@ -275,7 +275,7 @@ public: } } - virtual void SetValue(ControlState value) + virtual void SetValue(ControlState value) override { // Don't do anything special with the op we have. // Treat "A & B" the same as "A | B". @@ -283,12 +283,12 @@ public: rhs->SetValue(value); } - virtual int CountNumControls() + virtual int CountNumControls() override { return lhs->CountNumControls() + rhs->CountNumControls(); } - virtual operator std::string() + virtual operator std::string() override { return OpName(op) + "(" + (std::string)(*lhs) + ", " + (std::string)(*rhs) + ")"; } @@ -306,7 +306,7 @@ public: delete inner; } - virtual ControlState GetValue() + virtual ControlState GetValue() override { ControlState value = inner->GetValue(); switch (op) @@ -319,7 +319,7 @@ public: } } - virtual void SetValue(ControlState value) + virtual void SetValue(ControlState value) override { switch (op) { @@ -330,12 +330,12 @@ public: } } - virtual int CountNumControls() + virtual int CountNumControls() override { return inner->CountNumControls(); } - virtual operator std::string() + virtual operator std::string() override { return OpName(op) + "(" + (std::string)(*inner) + ")"; } diff --git a/Source/Core/InputCommon/Src/ControllerInterface/SDL/SDL.h b/Source/Core/InputCommon/Src/ControllerInterface/SDL/SDL.h index 8b802540b1..f1714b253e 100644 --- a/Source/Core/InputCommon/Src/ControllerInterface/SDL/SDL.h +++ b/Source/Core/InputCommon/Src/ControllerInterface/SDL/SDL.h @@ -43,9 +43,9 @@ private: class Button : public Core::Device::Input { public: - std::string GetName() const; + std::string GetName() const override; Button(u8 index, SDL_Joystick* js) : m_js(js), m_index(index) {} - ControlState GetState() const; + ControlState GetState() const override; private: SDL_Joystick* const m_js; const u8 m_index; @@ -54,9 +54,9 @@ private: class Axis : public Core::Device::Input { public: - std::string GetName() const; + std::string GetName() const override; Axis(u8 index, SDL_Joystick* js, Sint16 range) : m_js(js), m_range(range), m_index(index) {} - ControlState GetState() const; + ControlState GetState() const override; private: SDL_Joystick* const m_js; const Sint16 m_range; @@ -66,9 +66,9 @@ private: class Hat : public Input { public: - std::string GetName() const; + std::string GetName() const override; Hat(u8 index, SDL_Joystick* js, u8 direction) : m_js(js), m_direction(direction), m_index(index) {} - ControlState GetState() const; + ControlState GetState() const override; private: SDL_Joystick* const m_js; const u8 m_direction; @@ -130,15 +130,15 @@ private: #endif public: - bool UpdateInput(); - bool UpdateOutput(); + bool UpdateInput() override; + bool UpdateOutput() override; Joystick(SDL_Joystick* const joystick, const int sdl_index, const unsigned int index); ~Joystick(); - std::string GetName() const; - int GetId() const; - std::string GetSource() const; + std::string GetName() const override; + int GetId() const override; + std::string GetSource() const override; private: SDL_Joystick* const m_joystick; |
