1
0
mirror of https://github.com/esphome/esphome.git synced 2025-09-18 03:02:20 +01:00

Force braces around multi-line statements (#3094)

Co-authored-by: Jesse Hills <3060199+jesserockz@users.noreply.github.com>
This commit is contained in:
Oxan van Leeuwen
2022-01-24 20:56:36 +01:00
committed by GitHub
parent 6b27f2d2cf
commit 80d03a631e
125 changed files with 770 additions and 504 deletions

View File

@@ -51,10 +51,11 @@ static bool decode_data(RemoteReceiveData &src, CoolixData &dst) {
for (uint32_t mask = 1 << 7; mask; mask >>= 1) {
if (!src.expect_mark(BIT_MARK_US))
return false;
if (src.expect_space(BIT_ONE_SPACE_US))
if (src.expect_space(BIT_ONE_SPACE_US)) {
data |= mask;
else if (!src.expect_space(BIT_ZERO_SPACE_US))
} else if (!src.expect_space(BIT_ZERO_SPACE_US)) {
return false;
}
}
// Check for inverse byte
for (uint32_t mask = 1 << 7; mask; mask >>= 1) {