Skip to content

Commit 8204eee

Browse files
restyled-commitssoares-sergio
authored andcommitted
Restyled by clang-format
1 parent f933cc4 commit 8204eee

File tree

10 files changed

+154
-137
lines changed

10 files changed

+154
-137
lines changed

src/app/clusters/thermostat-server/thermostat-server.cpp

+2-2
Original file line numberDiff line numberDiff line change
@@ -1160,13 +1160,13 @@ bool emberAfThermostatClusterSetpointRaiseLowerCallback(app::CommandHandler * co
11601160
{
11611161
DesiredCoolingSetpoint = static_cast<int16_t>(CoolingSetpoint + amount * 10);
11621162
CoolLimit = static_cast<int16_t>(DesiredCoolingSetpoint -
1163-
EnforceCoolingSetpointLimits(DesiredCoolingSetpoint, aEndpointId));
1163+
EnforceCoolingSetpointLimits(DesiredCoolingSetpoint, aEndpointId));
11641164
{
11651165
if (OccupiedHeatingSetpoint::Get(aEndpointId, &HeatingSetpoint) == Status::Success)
11661166
{
11671167
DesiredHeatingSetpoint = static_cast<int16_t>(HeatingSetpoint + amount * 10);
11681168
HeatLimit = static_cast<int16_t>(DesiredHeatingSetpoint -
1169-
EnforceHeatingSetpointLimits(DesiredHeatingSetpoint, aEndpointId));
1169+
EnforceHeatingSetpointLimits(DesiredHeatingSetpoint, aEndpointId));
11701170
{
11711171
if (CoolLimit != 0 || HeatLimit != 0)
11721172
{

src/app/tests/TestReadInteraction.cpp

+4-2
Original file line numberDiff line numberDiff line change
@@ -182,7 +182,8 @@ class AttributeCaptureAssertion
182182
public:
183183
constexpr AttributeCaptureAssertion(chip::EndpointId ep, chip::ClusterId cl, chip::AttributeId at,
184184
std::optional<unsigned> listSize = std::nullopt) :
185-
mEndpoint(ep), mCluster(cl), mAttribute(at), mListSize(listSize)
185+
mEndpoint(ep),
186+
mCluster(cl), mAttribute(at), mListSize(listSize)
186187
{}
187188

188189
chip::app::ConcreteAttributePath Path() const { return chip::app::ConcreteAttributePath(mEndpoint, mCluster, mAttribute); }
@@ -1614,7 +1615,8 @@ void TestReadInteraction::TestSetDirtyBetweenChunks()
16141615
public:
16151616
DirtyingMockDelegate(AttributePathParams (&aReadPaths)[2], int & aNumAttributeResponsesWhenSetDirty,
16161617
int & aNumArrayItemsWhenSetDirty) :
1617-
mReadPaths(aReadPaths), mNumAttributeResponsesWhenSetDirty(aNumAttributeResponsesWhenSetDirty),
1618+
mReadPaths(aReadPaths),
1619+
mNumAttributeResponsesWhenSetDirty(aNumAttributeResponsesWhenSetDirty),
16181620
mNumArrayItemsWhenSetDirty(aNumArrayItemsWhenSetDirty)
16191621
{}
16201622

src/app/util/attribute-storage.cpp

+8-2
Original file line numberDiff line numberDiff line change
@@ -98,12 +98,18 @@ unsigned emberMetadataStructureGeneration = 0;
9898
// we need this data block for the defaults
9999
#if (defined(GENERATED_DEFAULTS) && GENERATED_DEFAULTS_COUNT)
100100
constexpr const uint8_t generatedDefaults[] = GENERATED_DEFAULTS;
101-
#define ZAP_LONG_DEFAULTS_INDEX(index) { &generatedDefaults[index] }
101+
#define ZAP_LONG_DEFAULTS_INDEX(index) \
102+
{ \
103+
&generatedDefaults[index] \
104+
}
102105
#endif // GENERATED_DEFAULTS
103106

104107
#if (defined(GENERATED_MIN_MAX_DEFAULTS) && GENERATED_MIN_MAX_DEFAULT_COUNT)
105108
constexpr const EmberAfAttributeMinMaxValue minMaxDefaults[] = GENERATED_MIN_MAX_DEFAULTS;
106-
#define ZAP_MIN_MAX_DEFAULTS_INDEX(index) { &minMaxDefaults[index] }
109+
#define ZAP_MIN_MAX_DEFAULTS_INDEX(index) \
110+
{ \
111+
&minMaxDefaults[index] \
112+
}
107113
#endif // GENERATED_MIN_MAX_DEFAULTS
108114

109115
#ifdef GENERATED_FUNCTION_ARRAYS

src/app/util/attribute-storage.h

+6-2
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,9 @@ static constexpr uint16_t kEmberInvalidEndpointIndex = 0xFFFF;
4545
// The role argument should be used to determine whether cluster works as a server or a client.
4646
// It can be assigned with the ZAP_CLUSTER_MASK(SERVER) or ZAP_CLUSTER_MASK(CLUSTER) values.
4747
#define DECLARE_DYNAMIC_CLUSTER(clusterId, clusterAttrs, role, incomingCommands, outgoingCommands) \
48-
{ clusterId, clusterAttrs, ARRAY_SIZE(clusterAttrs), 0, role, NULL, incomingCommands, outgoingCommands }
48+
{ \
49+
clusterId, clusterAttrs, ARRAY_SIZE(clusterAttrs), 0, role, NULL, incomingCommands, outgoingCommands \
50+
}
4951

5052
#define DECLARE_DYNAMIC_CLUSTER_LIST_END }
5153

@@ -64,7 +66,9 @@ static constexpr uint16_t kEmberInvalidEndpointIndex = 0xFFFF;
6466
// * Nullable attributes (have X in the quality column in the spec) must have MATTER_ATTRIBUTE_FLAG_NULLABLE
6567
// * Attributes that have T in the Access column in the spec must have MATTER_ATTRIBUTE_FLAG_MUST_USE_TIMED_WRITE
6668
#define DECLARE_DYNAMIC_ATTRIBUTE(attId, attType, attSizeBytes, attrMask) \
67-
{ ZAP_EMPTY_DEFAULT(), attId, attSizeBytes, ZAP_TYPE(attType), attrMask | ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE) }
69+
{ \
70+
ZAP_EMPTY_DEFAULT(), attId, attSizeBytes, ZAP_TYPE(attType), attrMask | ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE) \
71+
}
6872

6973
/**
7074
* @brief locate attribute metadata

src/controller/tests/data_model/TestRead.cpp

+2-2
Original file line numberDiff line numberDiff line change
@@ -4601,8 +4601,8 @@ TEST_F(TestRead, TestReadHandler_KeepSubscriptionTest)
46014601

46024602
readParam.mAttributePathParamsListSize = 0;
46034603
readClient = std::make_unique<ReadClient>(InteractionModelEngine::GetInstance(),
4604-
InteractionModelEngine::GetInstance()->GetExchangeManager(), readCallback,
4605-
ReadClient::InteractionType::Subscribe);
4604+
InteractionModelEngine::GetInstance()->GetExchangeManager(), readCallback,
4605+
ReadClient::InteractionType::Subscribe);
46064606
EXPECT_EQ(readClient->SendRequest(readParam), CHIP_NO_ERROR);
46074607

46084608
DrainAndServiceIO();

src/credentials/GroupDataProviderImpl.cpp

+11-6
Original file line numberDiff line numberDiff line change
@@ -275,7 +275,7 @@ struct GroupData : public GroupDataProvider::GroupInfo, PersistentData<kPersiste
275275
chip::GroupId prev = 0;
276276
bool first = true;
277277

278-
GroupData() : GroupInfo(nullptr) {};
278+
GroupData() : GroupInfo(nullptr){};
279279
GroupData(chip::FabricIndex fabric) : fabric_index(fabric) {}
280280
GroupData(chip::FabricIndex fabric, chip::GroupId group) : GroupInfo(group, nullptr), fabric_index(fabric) {}
281281

@@ -398,7 +398,7 @@ struct KeyMapData : public GroupDataProvider::GroupKey, LinkedData
398398
chip::GroupId group_id = kUndefinedGroupId;
399399
chip::KeysetId keyset_id = 0;
400400

401-
KeyMapData() {};
401+
KeyMapData(){};
402402
KeyMapData(chip::FabricIndex fabric, uint16_t link_id = 0, chip::GroupId group = kUndefinedGroupId, chip::KeysetId keyset = 0) :
403403
GroupKey(group, keyset), LinkedData(link_id), fabric_index(fabric)
404404
{}
@@ -549,7 +549,9 @@ struct EndpointData : GroupDataProvider::GroupEndpoint, PersistentData<kPersiste
549549

550550
EndpointData() = default;
551551
EndpointData(chip::FabricIndex fabric, chip::GroupId group = kUndefinedGroupId,
552-
chip::EndpointId endpoint = kInvalidEndpointId) : GroupEndpoint(group, endpoint), fabric_index(fabric)
552+
chip::EndpointId endpoint = kInvalidEndpointId) :
553+
GroupEndpoint(group, endpoint),
554+
fabric_index(fabric)
553555
{}
554556

555557
CHIP_ERROR UpdateKey(StorageKeyName & key) override
@@ -1169,7 +1171,8 @@ GroupDataProvider::GroupInfoIterator * GroupDataProviderImpl::IterateGroupInfo(c
11691171

11701172
GroupDataProviderImpl::GroupInfoIteratorImpl::GroupInfoIteratorImpl(GroupDataProviderImpl & provider,
11711173
chip::FabricIndex fabric_index) :
1172-
mProvider(provider), mFabric(fabric_index)
1174+
mProvider(provider),
1175+
mFabric(fabric_index)
11731176
{
11741177
FabricData fabric(fabric_index);
11751178
if (CHIP_NO_ERROR == fabric.Load(provider.mStorage))
@@ -1213,7 +1216,8 @@ GroupDataProvider::EndpointIterator * GroupDataProviderImpl::IterateEndpoints(ch
12131216

12141217
GroupDataProviderImpl::EndpointIteratorImpl::EndpointIteratorImpl(GroupDataProviderImpl & provider, chip::FabricIndex fabric_index,
12151218
std::optional<GroupId> group_id) :
1216-
mProvider(provider), mFabric(fabric_index)
1219+
mProvider(provider),
1220+
mFabric(fabric_index)
12171221
{
12181222
FabricData fabric(fabric_index);
12191223
VerifyOrReturn(CHIP_NO_ERROR == fabric.Load(provider.mStorage));
@@ -1473,7 +1477,8 @@ GroupDataProvider::GroupKeyIterator * GroupDataProviderImpl::IterateGroupKeys(ch
14731477

14741478
GroupDataProviderImpl::GroupKeyIteratorImpl::GroupKeyIteratorImpl(GroupDataProviderImpl & provider,
14751479
chip::FabricIndex fabric_index) :
1476-
mProvider(provider), mFabric(fabric_index)
1480+
mProvider(provider),
1481+
mFabric(fabric_index)
14771482
{
14781483
FabricData fabric(fabric_index);
14791484
if (CHIP_NO_ERROR == fabric.Load(provider.mStorage))

0 commit comments

Comments
 (0)