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:
Peter Johnson
2020-12-28 00:10:13 -08:00
parent 4cc0706b06
commit d11a3a6380
89 changed files with 156 additions and 151 deletions

View File

@@ -63,9 +63,11 @@ class Robot : public frc::TimedRobot {
frc::sim::EncoderSim m_encoderSim{m_encoder};
public:
void RobotInit() { m_encoder.SetDistancePerPulse(kArmEncoderDistPerPulse); }
void RobotInit() override {
m_encoder.SetDistancePerPulse(kArmEncoderDistPerPulse);
}
void SimulationPeriodic() {
void SimulationPeriodic() override {
// In this method, we update our simulation of what our arm is doing
// First, we set our "inputs" (voltages)
m_armSim.SetInput(frc::MakeMatrix<1, 1>(
@@ -82,7 +84,7 @@ class Robot : public frc::TimedRobot {
frc::sim::BatterySim::Calculate({m_armSim.GetCurrentDraw()}));
}
void TeleopPeriodic() {
void TeleopPeriodic() override {
if (m_joystick.GetTrigger()) {
// Here, we run PID control like normal, with a constant setpoint of 30in.
double pidOutput =
@@ -94,7 +96,7 @@ class Robot : public frc::TimedRobot {
}
}
void DisabledInit() {
void DisabledInit() override {
// This just makes sure that our simulation code knows that the motor's off.
m_motor.Set(0.0);
}