Skip to content

Commit

Permalink
Restyled by whitespace
Browse files Browse the repository at this point in the history
  • Loading branch information
restyled-commits authored and woody-apple committed Sep 13, 2024
1 parent 1e78ae6 commit f3ad99e
Showing 1 changed file with 10 additions and 10 deletions.
20 changes: 10 additions & 10 deletions src/darwin/Framework/CHIP/MTRBaseDevice.mm
Original file line number Diff line number Diff line change
Expand Up @@ -2284,7 +2284,7 @@ + (MTRAttributeRequestPath *)requestPathWithEndpointID:(NSNumber * _Nullable)end
clusterID:(NSNumber * _Nullable)clusterID
attributeID:(NSNumber * _Nullable)attributeID
{

return [[MTRAttributeRequestPath alloc] initWithEndpointID:endpointID clusterID:clusterID attributeID:attributeID];
}

Expand Down Expand Up @@ -2320,13 +2320,13 @@ - (void)convertToAttributePathParams:(chip::app::AttributePathParams &)params
} else {
params.SetWildcardEndpointId();
}

if (_cluster != nil) {
params.mClusterId = static_cast<chip::ClusterId>(_cluster.unsignedLongValue);
} else {
params.SetWildcardClusterId();
}

if (_attribute != nil) {
params.mAttributeId = static_cast<chip::AttributeId>(_attribute.unsignedLongValue);
} else {
Expand Down Expand Up @@ -2408,7 +2408,7 @@ + (MTREventRequestPath *)requestPathWithEndpointID:(NSNumber * _Nullable)endpoin
clusterID:(NSNumber * _Nullable)clusterID
eventID:(NSNumber * _Nullable)eventID
{

return [[MTREventRequestPath alloc] initWithEndpointID:endpointID clusterID:clusterID eventID:eventID];
}

Expand Down Expand Up @@ -2444,13 +2444,13 @@ - (void)convertToEventPathParams:(chip::app::EventPathParams &)params
} else {
params.SetWildcardEndpointId();
}

if (_cluster != nil) {
params.mClusterId = static_cast<chip::ClusterId>(_cluster.unsignedLongValue);
} else {
params.SetWildcardClusterId();
}

if (_event != nil) {
params.mEventId = static_cast<chip::EventId>(_event.unsignedLongValue);
} else {
Expand All @@ -2472,25 +2472,25 @@ - (nullable instancetype)initWithCoder:(NSCoder *)decoder
if (self == nil) {
return nil;
}

_endpoint = [decoder decodeObjectOfClass:[NSNumber class] forKey:sEventEndpointIDKey];
if (_endpoint && ![_endpoint isKindOfClass:[NSNumber class]]) {
MTR_LOG_ERROR("MTREventRequestPath decoded %@ for endpoint, not NSNumber.", _endpoint);
return nil;
}

_cluster = [decoder decodeObjectOfClass:[NSNumber class] forKey:sEventClusterIDKey];
if (_cluster && ![_cluster isKindOfClass:[NSNumber class]]) {
MTR_LOG_ERROR("MTREventRequestPath decoded %@ for cluster, not NSNumber.", _cluster);
return nil;
}

_event = [decoder decodeObjectOfClass:[NSNumber class] forKey:sEventAttributeIDKey];
if (_event && ![_event isKindOfClass:[NSNumber class]]) {
MTR_LOG_ERROR("MTREventRequestPath decoded %@ for event, not NSNumber.", _event);
return nil;
}

return self;
}

Expand Down

0 comments on commit f3ad99e

Please sign in to comment.