clang-modernize -add-override

This commit is contained in:
Tillmann Karras
2014-03-08 01:54:44 +01:00
parent c89f04a7c5
commit f28116b7da
67 changed files with 401 additions and 401 deletions

View File

@ -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) {}

View File

@ -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();
}

View File

@ -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;
};

View File

@ -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;

View File

@ -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;