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:
Peter Johnson
2020-12-28 12:58:06 -08:00
committed by GitHub
parent 0291a3ff56
commit 2aed432b4b
634 changed files with 10716 additions and 3938 deletions

View File

@@ -61,7 +61,9 @@ std::unique_ptr<CallbackStore> RelaySim::RegisterForwardCallback(
return store;
}
bool RelaySim::GetForward() const { return HALSIM_GetRelayForward(m_index); }
bool RelaySim::GetForward() const {
return HALSIM_GetRelayForward(m_index);
}
void RelaySim::SetForward(bool forward) {
HALSIM_SetRelayForward(m_index, forward);
@@ -76,10 +78,14 @@ std::unique_ptr<CallbackStore> RelaySim::RegisterReverseCallback(
return store;
}
bool RelaySim::GetReverse() const { return HALSIM_GetRelayReverse(m_index); }
bool RelaySim::GetReverse() const {
return HALSIM_GetRelayReverse(m_index);
}
void RelaySim::SetReverse(bool reverse) {
HALSIM_SetRelayReverse(m_index, reverse);
}
void RelaySim::ResetData() { HALSIM_ResetRelayData(m_index); }
void RelaySim::ResetData() {
HALSIM_ResetRelayData(m_index);
}