Skip to content

Commit a9ea997

Browse files
restyled-commitsrobszewczyk
authored andcommitted
Restyled by clang-format
1 parent 81e3b1c commit a9ea997

File tree

1 file changed

+15
-13
lines changed

1 file changed

+15
-13
lines changed

src/app/clusters/energy-preference-server/energy-preference-server.cpp

+15-13
Original file line numberDiff line numberDiff line change
@@ -77,12 +77,13 @@ CHIP_ERROR EnergyPrefAttrAccess::Read(const ConcreteReadAttributePath & aPath, A
7777
char buffer[64];
7878
Optional<MutableCharSpan> label{ MutableCharSpan(buffer) };
7979
if ((err = gsDelegate->GetEnergyBalanceAtIndex(endpoint, index, step, label)) == CHIP_NO_ERROR)
80-
{
81-
BalanceStruct::Type balance = { step,
82-
label.HasValue() ? Optional<CharSpan>(label.Value()) : Optional<CharSpan>() };
83-
ReturnErrorOnFailure(encoder.Encode(balance));
84-
index++;
85-
}
80+
{
81+
BalanceStruct::Type balance = { step,
82+
label.HasValue() ? Optional<CharSpan>(label.Value())
83+
: Optional<CharSpan>() };
84+
ReturnErrorOnFailure(encoder.Encode(balance));
85+
index++;
86+
}
8687
} while (err == CHIP_NO_ERROR);
8788

8889
if (err == CHIP_ERROR_NOT_FOUND)
@@ -135,16 +136,17 @@ CHIP_ERROR EnergyPrefAttrAccess::Read(const ConcreteReadAttributePath & aPath, A
135136
char buffer[64];
136137
Optional<MutableCharSpan> label{ MutableCharSpan(buffer) };
137138
if ((err = gsDelegate->GetLowPowerModeSensitivityAtIndex(endpoint, index, step, label)) == CHIP_NO_ERROR)
138-
{
139-
BalanceStruct::Type balance = { step,
140-
label.HasValue() ? Optional<CharSpan>(label.Value()) : Optional<CharSpan>() };
141-
ReturnErrorOnFailure(encoder.Encode(balance));
142-
index++;
143-
}
139+
{
140+
BalanceStruct::Type balance = { step,
141+
label.HasValue() ? Optional<CharSpan>(label.Value())
142+
: Optional<CharSpan>() };
143+
ReturnErrorOnFailure(encoder.Encode(balance));
144+
index++;
145+
}
144146
} while (err == CHIP_NO_ERROR);
145147
if (err == CHIP_ERROR_NOT_FOUND)
146148
{
147-
return CHIP_NO_ERROR;
149+
return CHIP_NO_ERROR;
148150
}
149151
return err;
150152
});

0 commit comments

Comments
 (0)