Add missing override specifiers

This commit is contained in:
Lioncash 2015-09-05 22:32:05 -04:00
parent 96e42dff52
commit 22635c1800
7 changed files with 53 additions and 50 deletions

View File

@ -132,9 +132,9 @@ public:
HotkeyManager(); HotkeyManager();
~HotkeyManager(); ~HotkeyManager();
std::string GetName() const;
void GetInput(HotkeyStatus* const hk); void GetInput(HotkeyStatus* const hk);
void LoadDefaults(const ControllerInterface& ciface); std::string GetName() const override;
void LoadDefaults(const ControllerInterface& ciface) override;
private: private:
Buttons* m_keys[(NUM_HOTKEYS + 31) / 32]; Buttons* m_keys[(NUM_HOTKEYS + 31) / 32];

View File

@ -79,9 +79,11 @@ private:
unsigned int OnConnect(ENetPeer* socket); unsigned int OnConnect(ENetPeer* socket);
unsigned int OnDisconnect(Client& player); unsigned int OnDisconnect(Client& player);
unsigned int OnData(sf::Packet& packet, Client& player); unsigned int OnData(sf::Packet& packet, Client& player);
virtual void OnTraversalStateChanged();
virtual void OnConnectReady(ENetAddress addr) {} void OnTraversalStateChanged() override;
virtual void OnConnectFailed(u8 reason) {} void OnConnectReady(ENetAddress) override {}
void OnConnectFailed(u8) override {}
void UpdatePadMapping(); void UpdatePadMapping();
void UpdateWiimoteMapping(); void UpdateWiimoteMapping();
std::vector<std::pair<std::string, std::string>> GetInterfaceListInternal(); std::vector<std::pair<std::string, std::string>> GetInterfaceListInternal();

View File

@ -20,9 +20,9 @@ private:
class Button : public Input class Button : public Input
{ {
public: public:
std::string GetName() const; Button(u8 index, const BYTE& button) : m_button(button), m_index(index) {}
Button(u8 index, const BYTE& button) : m_index(index), m_button(button) {} std::string GetName() const override;
ControlState GetState() const; ControlState GetState() const override;
private: private:
const BYTE& m_button; const BYTE& m_button;
const u8 m_index; const u8 m_index;
@ -31,9 +31,9 @@ private:
class Axis : public Input class Axis : public Input
{ {
public: public:
std::string GetName() const; Axis(u8 index, const LONG& axis, LONG base, LONG range) : m_axis(axis), m_base(base), m_range(range), m_index(index) {}
Axis(u8 index, const LONG& axis, LONG base, LONG range) : m_index(index), m_axis(axis), m_base(base), m_range(range) {} std::string GetName() const override;
ControlState GetState() const; ControlState GetState() const override;
private: private:
const LONG& m_axis; const LONG& m_axis;
const LONG m_base, m_range; const LONG m_base, m_range;
@ -43,9 +43,9 @@ private:
class Hat : public Input class Hat : public Input
{ {
public: public:
std::string GetName() const; Hat(u8 index, const DWORD& hat, u8 direction) : m_hat(hat), m_direction(direction), m_index(index) {}
Hat(u8 index, const DWORD& hat, u8 direction) : m_index(index), m_hat(hat), m_direction(direction) {} std::string GetName() const override;
ControlState GetState() const; ControlState GetState() const override;
private: private:
const DWORD& m_hat; const DWORD& m_hat;
const u8 m_index, m_direction; const u8 m_index, m_direction;
@ -57,9 +57,9 @@ public:
Joystick(const LPDIRECTINPUTDEVICE8 device, const unsigned int index); Joystick(const LPDIRECTINPUTDEVICE8 device, const unsigned int index);
~Joystick(); ~Joystick();
std::string GetName() const; std::string GetName() const override;
int GetId() const; int GetId() const override;
std::string GetSource() const; std::string GetSource() const override;
private: private:
const LPDIRECTINPUTDEVICE8 m_device; const LPDIRECTINPUTDEVICE8 m_device;

View File

@ -32,9 +32,9 @@ private:
class Key : public Input class Key : public Input
{ {
public: public:
std::string GetName() const; Key(u8 index, const BYTE& key) : m_key(key), m_index(index) {}
Key(u8 index, const BYTE& key) : m_index(index), m_key(key) {} std::string GetName() const override;
ControlState GetState() const; ControlState GetState() const override;
private: private:
const BYTE& m_key; const BYTE& m_key;
const u8 m_index; const u8 m_index;
@ -43,9 +43,9 @@ private:
class Button : public Input class Button : public Input
{ {
public: public:
std::string GetName() const; Button(u8 index, const BYTE& button) : m_button(button), m_index(index) {}
Button(u8 index, const BYTE& button) : m_index(index), m_button(button) {} std::string GetName() const override;
ControlState GetState() const; ControlState GetState() const override;
private: private:
const BYTE& m_button; const BYTE& m_button;
const u8 m_index; const u8 m_index;
@ -54,9 +54,9 @@ private:
class Axis : public Input class Axis : public Input
{ {
public: public:
std::string GetName() const; Axis(u8 index, const LONG& axis, LONG range) : m_axis(axis), m_range(range), m_index(index) {}
Axis(u8 index, const LONG& axis, LONG range) : m_index(index), m_axis(axis), m_range(range) {} std::string GetName() const override;
ControlState GetState() const; ControlState GetState() const override;
private: private:
const LONG& m_axis; const LONG& m_axis;
const LONG m_range; const LONG m_range;
@ -66,10 +66,10 @@ private:
class Cursor : public Input class Cursor : public Input
{ {
public: public:
std::string GetName() const; Cursor(u8 index, const ControlState& axis, const bool positive) : m_axis(axis), m_index(index), m_positive(positive) {}
bool IsDetectable() { return false; } std::string GetName() const override;
Cursor(u8 index, const ControlState& axis, const bool positive) : m_index(index), m_axis(axis), m_positive(positive) {} bool IsDetectable() override { return false; }
ControlState GetState() const; ControlState GetState() const override;
private: private:
const ControlState& m_axis; const ControlState& m_axis;
const u8 m_index; const u8 m_index;
@ -82,9 +82,9 @@ public:
KeyboardMouse(const LPDIRECTINPUTDEVICE8 kb_device, const LPDIRECTINPUTDEVICE8 mo_device); KeyboardMouse(const LPDIRECTINPUTDEVICE8 kb_device, const LPDIRECTINPUTDEVICE8 mo_device);
~KeyboardMouse(); ~KeyboardMouse();
std::string GetName() const; std::string GetName() const override;
int GetId() const; int GetId() const override;
std::string GetSource() const; std::string GetSource() const override;
private: private:
const LPDIRECTINPUTDEVICE8 m_kb_device; const LPDIRECTINPUTDEVICE8 m_kb_device;

View File

@ -29,9 +29,10 @@ private:
class Force : public Output class Force : public Output
{ {
public: public:
std::string GetName() const;
Force(const std::string& name, LPDIRECTINPUTEFFECT iface); Force(const std::string& name, LPDIRECTINPUTEFFECT iface);
~Force(); ~Force();
std::string GetName() const override;
void SetState(ControlState state); void SetState(ControlState state);
void Update(); void Update();
void Stop(); void Stop();

View File

@ -122,7 +122,7 @@ void DeInit()
} }
Device::Device(const XINPUT_CAPABILITIES& caps, u8 index) Device::Device(const XINPUT_CAPABILITIES& caps, u8 index)
: m_index(index), m_subtype(caps.SubType) : m_subtype(caps.SubType), m_index(index)
{ {
ZeroMemory(&m_state_out, sizeof(m_state_out)); ZeroMemory(&m_state_out, sizeof(m_state_out));

View File

@ -32,9 +32,9 @@ private:
class Button : public Core::Device::Input class Button : public Core::Device::Input
{ {
public: public:
std::string GetName() const; Button(u8 index, const WORD& buttons) : m_buttons(buttons), m_index(index) {}
Button(u8 index, const WORD& buttons) : m_index(index), m_buttons(buttons) {} std::string GetName() const override;
ControlState GetState() const; ControlState GetState() const override;
private: private:
const WORD& m_buttons; const WORD& m_buttons;
u8 m_index; u8 m_index;
@ -43,9 +43,9 @@ private:
class Axis : public Core::Device::Input class Axis : public Core::Device::Input
{ {
public: public:
std::string GetName() const; Axis(u8 index, const SHORT& axis, SHORT range) : m_axis(axis), m_range(range), m_index(index) {}
Axis(u8 index, const SHORT& axis, SHORT range) : m_index(index), m_axis(axis), m_range(range) {} std::string GetName() const override;
ControlState GetState() const; ControlState GetState() const override;
private: private:
const SHORT& m_axis; const SHORT& m_axis;
const SHORT m_range; const SHORT m_range;
@ -55,9 +55,9 @@ private:
class Trigger : public Core::Device::Input class Trigger : public Core::Device::Input
{ {
public: public:
std::string GetName() const; Trigger(u8 index, const BYTE& trigger, BYTE range) : m_trigger(trigger), m_range(range), m_index(index) {}
Trigger(u8 index, const BYTE& trigger, BYTE range) : m_index(index), m_trigger(trigger), m_range(range) {} std::string GetName() const override;
ControlState GetState() const; ControlState GetState() const override;
private: private:
const BYTE& m_trigger; const BYTE& m_trigger;
const BYTE m_range; const BYTE m_range;
@ -67,9 +67,9 @@ private:
class Motor : public Core::Device::Output class Motor : public Core::Device::Output
{ {
public: public:
std::string GetName() const; Motor(u8 index, Device* parent, WORD &motor, WORD range) : m_motor(motor), m_range(range), m_index(index), m_parent(parent) {}
Motor(u8 index, Device* parent, WORD &motor, WORD range) : m_index(index), m_parent(parent), m_motor(motor), m_range(range) {} std::string GetName() const override;
void SetState(ControlState state); void SetState(ControlState state) override;
private: private:
WORD& m_motor; WORD& m_motor;
const WORD m_range; const WORD m_range;
@ -82,9 +82,9 @@ public:
Device(const XINPUT_CAPABILITIES& capabilities, u8 index); Device(const XINPUT_CAPABILITIES& capabilities, u8 index);
std::string GetName() const; std::string GetName() const override;
int GetId() const; int GetId() const override;
std::string GetSource() const; std::string GetSource() const override;
void UpdateMotors(); void UpdateMotors();