@@ -29,13 +29,6 @@ namespace chip {
29
29
namespace app {
30
30
namespace {
31
31
32
- // / Checks if the specified ember cluster mask corresponds to a valid
33
- // / server cluster.
34
- bool IsServerMask (EmberAfClusterMask mask)
35
- {
36
- return (mask == 0 ) || ((mask & CLUSTER_MASK_SERVER) != 0 );
37
- }
38
-
39
32
// / Load the cluster information into the specified destination
40
33
std::variant<CHIP_ERROR, InteractionModel::ClusterInfo> LoadClusterInfo (const ConcreteClusterPath & path,
41
34
const EmberAfCluster & cluster)
@@ -86,7 +79,7 @@ InteractionModel::ClusterEntry FirstServerClusterEntry(EndpointId endpointId, co
86
79
for (unsigned cluster_idx = start_index; cluster_idx < endpoint->clusterCount ; cluster_idx++)
87
80
{
88
81
const EmberAfCluster & cluster = endpoint->cluster [cluster_idx];
89
- if (!IsServerMask ( cluster.mask ))
82
+ if (!cluster.IsServerMask ( ))
90
83
{
91
84
continue ;
92
85
}
@@ -338,7 +331,7 @@ std::optional<unsigned> CodegenDataModel::TryFindServerClusterIndex(const EmberA
338
331
if (mClusterIterationHint < clusterCount)
339
332
{
340
333
const EmberAfCluster & cluster = endpoint->cluster [mClusterIterationHint ];
341
- if (IsServerMask ( cluster.mask ) && (cluster.clusterId == id))
334
+ if (cluster.IsServerMask ( ) && (cluster.clusterId == id))
342
335
{
343
336
return std::make_optional (mClusterIterationHint );
344
337
}
@@ -350,7 +343,7 @@ std::optional<unsigned> CodegenDataModel::TryFindServerClusterIndex(const EmberA
350
343
for (unsigned cluster_idx = 0 ; cluster_idx < clusterCount; cluster_idx++)
351
344
{
352
345
const EmberAfCluster & cluster = endpoint->cluster [cluster_idx];
353
- if (IsServerMask ( cluster.mask ) && (cluster.clusterId == id))
346
+ if (cluster.IsServerMask ( ) && (cluster.clusterId == id))
354
347
{
355
348
return std::make_optional (cluster_idx);
356
349
}
0 commit comments