artf4107: Uniform initialization syntax introduced

Change-Id: I452b4794d757a0817589ec62b75eda7fbdd74904
This commit is contained in:
Tyler Veness
2015-06-24 01:06:29 -07:00
parent b1befed14f
commit 368ad30d37
179 changed files with 379 additions and 831 deletions

View File

@@ -14,7 +14,7 @@ class Command;
class ButtonScheduler {
public:
ButtonScheduler(bool last, Trigger *button, Command *orders);
virtual ~ButtonScheduler() {}
virtual ~ButtonScheduler() = default;
virtual void Execute() = 0;
void Start();

View File

@@ -16,7 +16,7 @@ class Command;
class CancelButtonScheduler : public ButtonScheduler {
public:
CancelButtonScheduler(bool last, Trigger *button, Command *orders);
virtual ~CancelButtonScheduler() {}
virtual ~CancelButtonScheduler() = default;
virtual void Execute();
private:

View File

@@ -16,7 +16,7 @@ class Command;
class HeldButtonScheduler : public ButtonScheduler {
public:
HeldButtonScheduler(bool last, Trigger *button, Command *orders);
virtual ~HeldButtonScheduler() {}
virtual ~HeldButtonScheduler() = default;
virtual void Execute();
};

View File

@@ -12,9 +12,9 @@
class InternalButton : public Button {
public:
InternalButton();
InternalButton() = default;
InternalButton(bool inverted);
virtual ~InternalButton() {}
virtual ~InternalButton() = default;
void SetInverted(bool inverted);
void SetPressed(bool pressed);
@@ -22,8 +22,8 @@ class InternalButton : public Button {
virtual bool Get();
private:
bool m_pressed;
bool m_inverted;
bool m_pressed = false;
bool m_inverted = false;
};
#endif

View File

@@ -14,7 +14,7 @@
class JoystickButton : public Button {
public:
JoystickButton(GenericHID *joystick, int buttonNumber);
virtual ~JoystickButton() {}
virtual ~JoystickButton() = default;
virtual bool Get();

View File

@@ -15,7 +15,7 @@ class NetworkButton : public Button {
public:
NetworkButton(const char *tableName, const char *field);
NetworkButton(ITable *table, const char *field);
virtual ~NetworkButton() {}
virtual ~NetworkButton() = default;
virtual bool Get();

View File

@@ -16,7 +16,7 @@ class Command;
class PressedButtonScheduler : public ButtonScheduler {
public:
PressedButtonScheduler(bool last, Trigger *button, Command *orders);
virtual ~PressedButtonScheduler() {}
virtual ~PressedButtonScheduler() = default;
virtual void Execute();
};

View File

@@ -16,7 +16,7 @@ class Command;
class ReleasedButtonScheduler : public ButtonScheduler {
public:
ReleasedButtonScheduler(bool last, Trigger *button, Command *orders);
virtual ~ReleasedButtonScheduler() {}
virtual ~ReleasedButtonScheduler() = default;
virtual void Execute();
};

View File

@@ -16,7 +16,7 @@ class Command;
class ToggleButtonScheduler : public ButtonScheduler {
public:
ToggleButtonScheduler(bool last, Trigger *button, Command *orders);
virtual ~ToggleButtonScheduler() {}
virtual ~ToggleButtonScheduler() = default;
virtual void Execute();
private:

View File

@@ -31,8 +31,8 @@ class Command;
*/
class Trigger : public Sendable {
public:
Trigger();
virtual ~Trigger() {}
Trigger() = default;
virtual ~Trigger() = default;
bool Grab();
virtual bool Get() = 0;
void WhenActive(Command *command);
@@ -46,7 +46,7 @@ class Trigger : public Sendable {
virtual std::string GetSmartDashboardType() const;
protected:
ITable *m_table;
ITable *m_table = nullptr;
};
#endif