mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-06-20 00:51:42 +00:00
Add braces to C++ single-line loops and conditionals (NFC) (#2973)
This makes code easier to read and more consistent between C++ and Java. Also update clang-format settings to always add a line break (even if no braces are used).
This commit is contained in:
@@ -18,9 +18,13 @@ void PIDSubsystem::Periodic() {
|
||||
}
|
||||
}
|
||||
|
||||
void PIDSubsystem::SetSetpoint(double setpoint) { m_setpoint = setpoint; }
|
||||
void PIDSubsystem::SetSetpoint(double setpoint) {
|
||||
m_setpoint = setpoint;
|
||||
}
|
||||
|
||||
double PIDSubsystem::GetSetpoint() const { return m_setpoint; }
|
||||
double PIDSubsystem::GetSetpoint() const {
|
||||
return m_setpoint;
|
||||
}
|
||||
|
||||
void PIDSubsystem::Enable() {
|
||||
m_controller.Reset();
|
||||
@@ -32,6 +36,10 @@ void PIDSubsystem::Disable() {
|
||||
m_enabled = false;
|
||||
}
|
||||
|
||||
bool PIDSubsystem::IsEnabled() { return m_enabled; }
|
||||
bool PIDSubsystem::IsEnabled() {
|
||||
return m_enabled;
|
||||
}
|
||||
|
||||
PIDController& PIDSubsystem::GetController() { return m_controller; }
|
||||
PIDController& PIDSubsystem::GetController() {
|
||||
return m_controller;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user