Skip to content

Commit

Permalink
Restyled by clang-format
Browse files Browse the repository at this point in the history
  • Loading branch information
restyled-commits authored and robszewczyk committed Feb 15, 2024
1 parent 61be1e5 commit 024b0ca
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 12 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,11 @@ struct EPrefDelegate : public Delegate
EPrefDelegate();
virtual ~EPrefDelegate();

CHIP_ERROR GetEnergyBalanceAtIndex(chip::EndpointId aEndpoint, size_t aIndex, chip::Percent & aOutStep, chip::MutableCharSpan & aOutLabel) override;
CHIP_ERROR GetEnergyBalanceAtIndex(chip::EndpointId aEndpoint, size_t aIndex, chip::Percent & aOutStep,
chip::MutableCharSpan & aOutLabel) override;
CHIP_ERROR GetEnergyPriorityAtIndex(chip::EndpointId aEndpoint, size_t aIndex, EnergyPriorityEnum & priority) override;
CHIP_ERROR GetLowPowerModeSensitivityAtIndex(chip::EndpointId aEndpoint, size_t aIndex, chip::Percent & aOutStep, chip::MutableCharSpan & aOutLabel) override;
CHIP_ERROR GetLowPowerModeSensitivityAtIndex(chip::EndpointId aEndpoint, size_t aIndex, chip::Percent & aOutStep,
chip::MutableCharSpan & aOutLabel) override;

size_t GetNumEnergyBalances(chip::EndpointId aEndpoint) override;
size_t GetNumLowPowerModeSensitivities(chip::EndpointId aEndpoint) override;
Expand Down Expand Up @@ -60,7 +62,8 @@ size_t EPrefDelegate::GetNumLowPowerModeSensitivities(chip::EndpointId aEndpoint
}

CHIP_ERROR
EPrefDelegate::GetEnergyBalanceAtIndex(chip::EndpointId aEndpoint, size_t aIndex, chip::Percent & aOutStep, chip::MutableCharSpan & aOutLabel)
EPrefDelegate::GetEnergyBalanceAtIndex(chip::EndpointId aEndpoint, size_t aIndex, chip::Percent & aOutStep,
chip::MutableCharSpan & aOutLabel)
{
if (aIndex < GetNumEnergyBalances(aEndpoint))
{
Expand All @@ -86,7 +89,8 @@ EPrefDelegate::GetEnergyPriorityAtIndex(chip::EndpointId aEndpoint, size_t aInde
}

CHIP_ERROR
EPrefDelegate::GetLowPowerModeSensitivityAtIndex(chip::EndpointId aEndpoint, size_t aIndex, chip::Percent & aOutStep, chip::MutableCharSpan & aOutLabel)
EPrefDelegate::GetLowPowerModeSensitivityAtIndex(chip::EndpointId aEndpoint, size_t aIndex, chip::Percent & aOutStep,
chip::MutableCharSpan & aOutLabel)
{
if (aIndex < GetNumLowPowerModeSensitivities(aEndpoint))
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ CHIP_ERROR EnergyPrefAttrAccess::Read(const ConcreteReadAttributePath & aPath, A
CHIP_ERROR err = CHIP_NO_ERROR;
while ((err = gsDelegate->GetEnergyBalanceAtIndex(endpoint, index, step, label)) == CHIP_NO_ERROR)
{
BalanceStruct::Type balance = {step, Optional<CharSpan>(label)};
BalanceStruct::Type balance = { step, Optional<CharSpan>(label) };
ReturnErrorOnFailure(encoder.Encode(balance));
index++;
}
Expand Down Expand Up @@ -129,7 +129,7 @@ CHIP_ERROR EnergyPrefAttrAccess::Read(const ConcreteReadAttributePath & aPath, A
CHIP_ERROR err = CHIP_NO_ERROR;
while ((err = gsDelegate->GetLowPowerModeSensitivityAtIndex(endpoint, index, step, label)) == CHIP_NO_ERROR)
{
BalanceStruct::Type balance = {step, Optional<CharSpan>(label)};
BalanceStruct::Type balance = { step, Optional<CharSpan>(label) };
ReturnErrorOnFailure(encoder.Encode(balance));
index++;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,9 +52,8 @@ struct Delegate
*
* @return CHIP_ERROR_NOT_FOUND if the index is out of range.
*/
virtual CHIP_ERROR
GetEnergyBalanceAtIndex(chip::EndpointId aEndpoint, size_t aIndex,
chip::Percent & aOutStep, chip::MutableCharSpan & aOutLabel) = 0;
virtual CHIP_ERROR GetEnergyBalanceAtIndex(chip::EndpointId aEndpoint, size_t aIndex, chip::Percent & aOutStep,
chip::MutableCharSpan & aOutLabel) = 0;

/**
* Get an Energy Priority.
Expand Down Expand Up @@ -84,9 +83,8 @@ struct Delegate
*
* @return CHIP_ERROR_NOT_FOUND if the index is out of range.
*/
virtual CHIP_ERROR
GetLowPowerModeSensitivityAtIndex(chip::EndpointId aEndpoint, size_t aIndex,
chip::Percent & aOutStep, chip::MutableCharSpan & aOutLabel) = 0;
virtual CHIP_ERROR GetLowPowerModeSensitivityAtIndex(chip::EndpointId aEndpoint, size_t aIndex, chip::Percent & aOutStep,
chip::MutableCharSpan & aOutLabel) = 0;

/**
* Get the number of energy balances this endpoint has.
Expand Down

0 comments on commit 024b0ca

Please sign in to comment.