Skip to content

Commit cdfca87

Browse files
restyled-commitsrobszewczyk
authored andcommitted
Restyled by clang-format
1 parent 88ad2a9 commit cdfca87

File tree

1 file changed

+8
-6
lines changed

1 file changed

+8
-6
lines changed

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

+8-6
Original file line numberDiff line numberDiff line change
@@ -52,8 +52,8 @@ Delegate * gsDelegate = nullptr;
5252
CHIP_ERROR EnergyPrefAttrAccess::Read(const ConcreteReadAttributePath & aPath, AttributeValueEncoder & aEncoder)
5353
{
5454
VerifyOrDie(aPath.mClusterId == EnergyPreference::Id);
55-
EndpointId endpoint = aPath.mEndpointId;
56-
uint32_t ourFeatureMap = 0;
55+
EndpointId endpoint = aPath.mEndpointId;
56+
uint32_t ourFeatureMap = 0;
5757
const bool featureMapIsGood = FeatureMap::Get(aPath.mEndpointId, &ourFeatureMap) == Status::Success;
5858
const bool balanceSupported = featureMapIsGood && ((ourFeatureMap & to_underlying(Feature::kEnergyBalance)) != 0);
5959
const bool lowPowerSupported = featureMapIsGood && ((ourFeatureMap & to_underlying(Feature::kLowPowerModeSensitivity)) != 0);
@@ -71,12 +71,13 @@ CHIP_ERROR EnergyPrefAttrAccess::Read(const ConcreteReadAttributePath & aPath, A
7171
return aEncoder.EncodeList([endpoint](const auto & encoder) -> CHIP_ERROR {
7272
chip::Percent step;
7373
char buffer[64];
74-
chip::Optional<chip::MutableCharSpan> label{chip::MutableCharSpan(buffer)};
74+
chip::Optional<chip::MutableCharSpan> label{ chip::MutableCharSpan(buffer) };
7575
size_t index = 0;
7676
CHIP_ERROR err = CHIP_NO_ERROR;
7777
while ((err = gsDelegate->GetEnergyBalanceAtIndex(endpoint, index, step, label)) == CHIP_NO_ERROR)
7878
{
79-
BalanceStruct::Type balance = { step, label.HasValue() ? Optional<CharSpan>(label.Value()) : Optional<CharSpan>() };
79+
BalanceStruct::Type balance = { step,
80+
label.HasValue() ? Optional<CharSpan>(label.Value()) : Optional<CharSpan>() };
8081
ReturnErrorOnFailure(encoder.Encode(balance));
8182
index++;
8283
}
@@ -124,12 +125,13 @@ CHIP_ERROR EnergyPrefAttrAccess::Read(const ConcreteReadAttributePath & aPath, A
124125
return aEncoder.EncodeList([endpoint](const auto & encoder) -> CHIP_ERROR {
125126
chip::Percent step;
126127
char buffer[64];
127-
chip::Optional<chip::MutableCharSpan> label{chip::MutableCharSpan(buffer)};
128+
chip::Optional<chip::MutableCharSpan> label{ chip::MutableCharSpan(buffer) };
128129
size_t index = 0;
129130
CHIP_ERROR err = CHIP_NO_ERROR;
130131
while ((err = gsDelegate->GetLowPowerModeSensitivityAtIndex(endpoint, index, step, label)) == CHIP_NO_ERROR)
131132
{
132-
BalanceStruct::Type balance = { step, label.HasValue() ? Optional<CharSpan>(label.Value()) : Optional<CharSpan>() };
133+
BalanceStruct::Type balance = { step,
134+
label.HasValue() ? Optional<CharSpan>(label.Value()) : Optional<CharSpan>() };
133135
ReturnErrorOnFailure(encoder.Encode(balance));
134136
index++;
135137
}

0 commit comments

Comments
 (0)