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:
@@ -44,7 +44,9 @@ AnalogOutput::AnalogOutput(int channel) {
|
||||
SendableRegistry::GetInstance().AddLW(this, "AnalogOutput", m_channel);
|
||||
}
|
||||
|
||||
AnalogOutput::~AnalogOutput() { HAL_FreeAnalogOutputPort(m_port); }
|
||||
AnalogOutput::~AnalogOutput() {
|
||||
HAL_FreeAnalogOutputPort(m_port);
|
||||
}
|
||||
|
||||
void AnalogOutput::SetVoltage(double voltage) {
|
||||
int32_t status = 0;
|
||||
@@ -62,7 +64,9 @@ double AnalogOutput::GetVoltage() const {
|
||||
return voltage;
|
||||
}
|
||||
|
||||
int AnalogOutput::GetChannel() const { return m_channel; }
|
||||
int AnalogOutput::GetChannel() const {
|
||||
return m_channel;
|
||||
}
|
||||
|
||||
void AnalogOutput::InitSendable(SendableBuilder& builder) {
|
||||
builder.SetSmartDashboardType("Analog Output");
|
||||
|
||||
Reference in New Issue
Block a user