mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-06-25 01:41:43 +00:00
clang-tidy: modernize-use-override (NFC)
Add NOLINT to CommandTestBase due to gmock not adding "override" keyword, which causes warnings on clang.
This commit is contained in:
@@ -25,8 +25,8 @@ class DigitalSource : public InterruptableSensorBase {
|
||||
DigitalSource(DigitalSource&&) = default;
|
||||
DigitalSource& operator=(DigitalSource&&) = default;
|
||||
|
||||
virtual HAL_Handle GetPortHandleForRouting() const = 0;
|
||||
virtual AnalogTriggerType GetAnalogTriggerTypeForRouting() const = 0;
|
||||
HAL_Handle GetPortHandleForRouting() const override = 0;
|
||||
AnalogTriggerType GetAnalogTriggerTypeForRouting() const override = 0;
|
||||
virtual bool IsAnalogTrigger() const = 0;
|
||||
virtual int GetChannel() const = 0;
|
||||
};
|
||||
|
||||
@@ -44,7 +44,7 @@ class GenericHID : public ErrorBase {
|
||||
enum JoystickHand { kLeftHand = 0, kRightHand = 1 };
|
||||
|
||||
explicit GenericHID(int port);
|
||||
virtual ~GenericHID() = default;
|
||||
~GenericHID() override = default;
|
||||
|
||||
GenericHID(GenericHID&&) = default;
|
||||
GenericHID& operator=(GenericHID&&) = default;
|
||||
|
||||
@@ -35,7 +35,7 @@ class InterruptableSensorBase : public ErrorBase {
|
||||
/**
|
||||
* Free the resources for an interrupt event.
|
||||
*/
|
||||
virtual ~InterruptableSensorBase();
|
||||
~InterruptableSensorBase() override;
|
||||
|
||||
InterruptableSensorBase(InterruptableSensorBase&&) = default;
|
||||
InterruptableSensorBase& operator=(InterruptableSensorBase&&) = default;
|
||||
|
||||
@@ -28,7 +28,7 @@ class IterativeRobot : public IterativeRobotBase {
|
||||
"Use TimedRobot instead. It's a drop-in replacement that provides more "
|
||||
"regular execution periods.")
|
||||
IterativeRobot();
|
||||
virtual ~IterativeRobot() = default;
|
||||
~IterativeRobot() override = default;
|
||||
|
||||
/**
|
||||
* Provide an alternate "main loop" via StartCompetition().
|
||||
|
||||
@@ -178,7 +178,7 @@ class IterativeRobotBase : public RobotBase {
|
||||
*/
|
||||
explicit IterativeRobotBase(units::second_t period);
|
||||
|
||||
virtual ~IterativeRobotBase() = default;
|
||||
~IterativeRobotBase() override = default;
|
||||
|
||||
protected:
|
||||
IterativeRobotBase(IterativeRobotBase&&) = default;
|
||||
|
||||
@@ -39,7 +39,7 @@ class Joystick : public GenericHID {
|
||||
*/
|
||||
explicit Joystick(int port);
|
||||
|
||||
virtual ~Joystick() = default;
|
||||
~Joystick() override = default;
|
||||
|
||||
Joystick(Joystick&&) = default;
|
||||
Joystick& operator=(Joystick&&) = default;
|
||||
|
||||
@@ -21,7 +21,7 @@ namespace frc {
|
||||
class MotorSafety : public ErrorBase {
|
||||
public:
|
||||
MotorSafety();
|
||||
virtual ~MotorSafety();
|
||||
~MotorSafety() override;
|
||||
|
||||
MotorSafety(MotorSafety&& rhs);
|
||||
MotorSafety& operator=(MotorSafety&& rhs);
|
||||
|
||||
@@ -62,7 +62,7 @@ class Notifier : public ErrorBase {
|
||||
/**
|
||||
* Free the resources for a timer event.
|
||||
*/
|
||||
virtual ~Notifier();
|
||||
~Notifier() override;
|
||||
|
||||
Notifier(Notifier&& rhs);
|
||||
Notifier& operator=(Notifier&& rhs);
|
||||
|
||||
@@ -65,7 +65,7 @@ class PIDBase : public PIDInterface,
|
||||
PIDBase(double p, double i, double d, double f, PIDSource& source,
|
||||
PIDOutput& output);
|
||||
|
||||
virtual ~PIDBase() = default;
|
||||
~PIDBase() override = default;
|
||||
|
||||
/**
|
||||
* Return the current PID result.
|
||||
|
||||
@@ -226,7 +226,7 @@ class Preferences : public ErrorBase {
|
||||
|
||||
protected:
|
||||
Preferences();
|
||||
virtual ~Preferences() = default;
|
||||
~Preferences() override = default;
|
||||
|
||||
Preferences(Preferences&&) = default;
|
||||
Preferences& operator=(Preferences&&) = default;
|
||||
|
||||
@@ -28,7 +28,7 @@ namespace frc {
|
||||
*/
|
||||
class Resource : public ErrorBase {
|
||||
public:
|
||||
virtual ~Resource() = default;
|
||||
~Resource() override = default;
|
||||
|
||||
/**
|
||||
* Factory method to create a Resource allocation-tracker *if* needed.
|
||||
|
||||
@@ -126,7 +126,7 @@ class RobotDrive : public MotorSafety {
|
||||
std::shared_ptr<SpeedController> frontRightMotor,
|
||||
std::shared_ptr<SpeedController> rearRightMotor);
|
||||
|
||||
virtual ~RobotDrive() = default;
|
||||
~RobotDrive() override = default;
|
||||
|
||||
RobotDrive(RobotDrive&&) = default;
|
||||
RobotDrive& operator=(RobotDrive&&) = default;
|
||||
|
||||
@@ -87,7 +87,7 @@ class SerialPort : public ErrorBase {
|
||||
int dataBits = 8, Parity parity = kParity_None,
|
||||
StopBits stopBits = kStopBits_One);
|
||||
|
||||
~SerialPort();
|
||||
~SerialPort() override;
|
||||
|
||||
SerialPort(SerialPort&& rhs) = default;
|
||||
SerialPort& operator=(SerialPort&& rhs) = default;
|
||||
|
||||
@@ -29,7 +29,7 @@ class XboxController : public GenericHID {
|
||||
*/
|
||||
explicit XboxController(int port);
|
||||
|
||||
virtual ~XboxController() = default;
|
||||
~XboxController() override = default;
|
||||
|
||||
XboxController(XboxController&&) = default;
|
||||
XboxController& operator=(XboxController&&) = default;
|
||||
|
||||
@@ -23,7 +23,7 @@ class Filter : public PIDSource {
|
||||
explicit Filter(PIDSource& source);
|
||||
WPI_DEPRECATED("This class is no longer used.")
|
||||
explicit Filter(std::shared_ptr<PIDSource> source);
|
||||
virtual ~Filter() = default;
|
||||
~Filter() override = default;
|
||||
|
||||
Filter(Filter&&) = default;
|
||||
Filter& operator=(Filter&&) = default;
|
||||
|
||||
@@ -14,7 +14,7 @@ namespace frc {
|
||||
class Potentiometer : public PIDSource {
|
||||
public:
|
||||
Potentiometer() = default;
|
||||
virtual ~Potentiometer() = default;
|
||||
~Potentiometer() override = default;
|
||||
|
||||
Potentiometer(Potentiometer&&) = default;
|
||||
Potentiometer& operator=(Potentiometer&&) = default;
|
||||
|
||||
@@ -29,7 +29,7 @@ class ShuffleboardComponent : public ShuffleboardComponentBase {
|
||||
ShuffleboardComponent(ShuffleboardContainer& parent, const wpi::Twine& title,
|
||||
const wpi::Twine& type = "");
|
||||
|
||||
virtual ~ShuffleboardComponent() = default;
|
||||
~ShuffleboardComponent() override = default;
|
||||
|
||||
/**
|
||||
* Sets custom properties for this component. Property names are
|
||||
|
||||
@@ -27,7 +27,7 @@ class ShuffleboardComponentBase : public virtual ShuffleboardValue {
|
||||
const wpi::Twine& title,
|
||||
const wpi::Twine& type = "");
|
||||
|
||||
virtual ~ShuffleboardComponentBase() = default;
|
||||
~ShuffleboardComponentBase() override = default;
|
||||
|
||||
void SetType(const wpi::Twine& type);
|
||||
|
||||
|
||||
@@ -45,7 +45,7 @@ class ShuffleboardContainer : public virtual ShuffleboardValue,
|
||||
|
||||
ShuffleboardContainer(ShuffleboardContainer&& rhs) = default;
|
||||
|
||||
virtual ~ShuffleboardContainer() = default;
|
||||
~ShuffleboardContainer() override = default;
|
||||
|
||||
/**
|
||||
* Gets the components that are direct children of this container.
|
||||
|
||||
@@ -432,7 +432,7 @@ class SmartDashboard : public ErrorBase,
|
||||
static void UpdateValues();
|
||||
|
||||
private:
|
||||
virtual ~SmartDashboard() = default;
|
||||
~SmartDashboard() override = default;
|
||||
|
||||
static detail::ListenerExecutor listenerExecutor;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user