mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-06-21 01:01:43 +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:
@@ -37,8 +37,12 @@ std::vector<std::string> SimDeviceSim::GetEnumOptions(hal::SimEnum val) {
|
||||
const char** options = HALSIM_GetSimValueEnumOptions(val, &numOptions);
|
||||
std::vector<std::string> rv;
|
||||
rv.reserve(numOptions);
|
||||
for (int32_t i = 0; i < numOptions; ++i) rv.emplace_back(options[i]);
|
||||
for (int32_t i = 0; i < numOptions; ++i) {
|
||||
rv.emplace_back(options[i]);
|
||||
}
|
||||
return rv;
|
||||
}
|
||||
|
||||
void SimDeviceSim::ResetData() { HALSIM_ResetSimDeviceData(); }
|
||||
void SimDeviceSim::ResetData() {
|
||||
HALSIM_ResetSimDeviceData();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user