Skip to content

Commit 024b0ca

Browse files
restyled-commitsrobszewczyk
authored andcommitted
Restyled by clang-format
1 parent 61be1e5 commit 024b0ca

File tree

3 files changed

+14
-12
lines changed

3 files changed

+14
-12
lines changed

examples/all-clusters-app/all-clusters-common/src/energy-preference-delegate.cpp

+8-4
Original file line numberDiff line numberDiff line change
@@ -29,9 +29,11 @@ struct EPrefDelegate : public Delegate
2929
EPrefDelegate();
3030
virtual ~EPrefDelegate();
3131

32-
CHIP_ERROR GetEnergyBalanceAtIndex(chip::EndpointId aEndpoint, size_t aIndex, chip::Percent & aOutStep, chip::MutableCharSpan & aOutLabel) override;
32+
CHIP_ERROR GetEnergyBalanceAtIndex(chip::EndpointId aEndpoint, size_t aIndex, chip::Percent & aOutStep,
33+
chip::MutableCharSpan & aOutLabel) override;
3334
CHIP_ERROR GetEnergyPriorityAtIndex(chip::EndpointId aEndpoint, size_t aIndex, EnergyPriorityEnum & priority) override;
34-
CHIP_ERROR GetLowPowerModeSensitivityAtIndex(chip::EndpointId aEndpoint, size_t aIndex, chip::Percent & aOutStep, chip::MutableCharSpan & aOutLabel) override;
35+
CHIP_ERROR GetLowPowerModeSensitivityAtIndex(chip::EndpointId aEndpoint, size_t aIndex, chip::Percent & aOutStep,
36+
chip::MutableCharSpan & aOutLabel) override;
3537

3638
size_t GetNumEnergyBalances(chip::EndpointId aEndpoint) override;
3739
size_t GetNumLowPowerModeSensitivities(chip::EndpointId aEndpoint) override;
@@ -60,7 +62,8 @@ size_t EPrefDelegate::GetNumLowPowerModeSensitivities(chip::EndpointId aEndpoint
6062
}
6163

6264
CHIP_ERROR
63-
EPrefDelegate::GetEnergyBalanceAtIndex(chip::EndpointId aEndpoint, size_t aIndex, chip::Percent & aOutStep, chip::MutableCharSpan & aOutLabel)
65+
EPrefDelegate::GetEnergyBalanceAtIndex(chip::EndpointId aEndpoint, size_t aIndex, chip::Percent & aOutStep,
66+
chip::MutableCharSpan & aOutLabel)
6467
{
6568
if (aIndex < GetNumEnergyBalances(aEndpoint))
6669
{
@@ -86,7 +89,8 @@ EPrefDelegate::GetEnergyPriorityAtIndex(chip::EndpointId aEndpoint, size_t aInde
8689
}
8790

8891
CHIP_ERROR
89-
EPrefDelegate::GetLowPowerModeSensitivityAtIndex(chip::EndpointId aEndpoint, size_t aIndex, chip::Percent & aOutStep, chip::MutableCharSpan & aOutLabel)
92+
EPrefDelegate::GetLowPowerModeSensitivityAtIndex(chip::EndpointId aEndpoint, size_t aIndex, chip::Percent & aOutStep,
93+
chip::MutableCharSpan & aOutLabel)
9094
{
9195
if (aIndex < GetNumLowPowerModeSensitivities(aEndpoint))
9296
{

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

+2-2
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ CHIP_ERROR EnergyPrefAttrAccess::Read(const ConcreteReadAttributePath & aPath, A
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, Optional<CharSpan>(label)};
79+
BalanceStruct::Type balance = { step, Optional<CharSpan>(label) };
8080
ReturnErrorOnFailure(encoder.Encode(balance));
8181
index++;
8282
}
@@ -129,7 +129,7 @@ CHIP_ERROR EnergyPrefAttrAccess::Read(const ConcreteReadAttributePath & aPath, A
129129
CHIP_ERROR err = CHIP_NO_ERROR;
130130
while ((err = gsDelegate->GetLowPowerModeSensitivityAtIndex(endpoint, index, step, label)) == CHIP_NO_ERROR)
131131
{
132-
BalanceStruct::Type balance = {step, Optional<CharSpan>(label)};
132+
BalanceStruct::Type balance = { step, Optional<CharSpan>(label) };
133133
ReturnErrorOnFailure(encoder.Encode(balance));
134134
index++;
135135
}

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

+4-6
Original file line numberDiff line numberDiff line change
@@ -52,9 +52,8 @@ struct Delegate
5252
*
5353
* @return CHIP_ERROR_NOT_FOUND if the index is out of range.
5454
*/
55-
virtual CHIP_ERROR
56-
GetEnergyBalanceAtIndex(chip::EndpointId aEndpoint, size_t aIndex,
57-
chip::Percent & aOutStep, chip::MutableCharSpan & aOutLabel) = 0;
55+
virtual CHIP_ERROR GetEnergyBalanceAtIndex(chip::EndpointId aEndpoint, size_t aIndex, chip::Percent & aOutStep,
56+
chip::MutableCharSpan & aOutLabel) = 0;
5857

5958
/**
6059
* Get an Energy Priority.
@@ -84,9 +83,8 @@ struct Delegate
8483
*
8584
* @return CHIP_ERROR_NOT_FOUND if the index is out of range.
8685
*/
87-
virtual CHIP_ERROR
88-
GetLowPowerModeSensitivityAtIndex(chip::EndpointId aEndpoint, size_t aIndex,
89-
chip::Percent & aOutStep, chip::MutableCharSpan & aOutLabel) = 0;
86+
virtual CHIP_ERROR GetLowPowerModeSensitivityAtIndex(chip::EndpointId aEndpoint, size_t aIndex, chip::Percent & aOutStep,
87+
chip::MutableCharSpan & aOutLabel) = 0;
9088

9189
/**
9290
* Get the number of energy balances this endpoint has.

0 commit comments

Comments
 (0)