diff --git a/src/darwin/Framework/CHIP/MTRBaseDevice.mm b/src/darwin/Framework/CHIP/MTRBaseDevice.mm index 5a4c1794502bb1..8a1feefea20607 100644 --- a/src/darwin/Framework/CHIP/MTRBaseDevice.mm +++ b/src/darwin/Framework/CHIP/MTRBaseDevice.mm @@ -2276,8 +2276,8 @@ - (instancetype)initWithEndpointID:(NSNumber * _Nullable)endpointID - (NSString *)description { return [NSString stringWithFormat:@"", - (uint16_t) _endpoint.unsignedShortValue, (uint32_t) _cluster.unsignedLongValue, - (uint32_t) _attribute.unsignedLongValue]; + (uint16_t) _endpoint.unsignedShortValue, (uint32_t) _cluster.unsignedLongValue, + (uint32_t) _attribute.unsignedLongValue]; } + (MTRAttributeRequestPath *)requestPathWithEndpointID:(NSNumber * _Nullable)endpointID @@ -2291,8 +2291,8 @@ + (MTRAttributeRequestPath *)requestPathWithEndpointID:(NSNumber * _Nullable)end - (BOOL)isEqualToAttributeRequestPath:(MTRAttributeRequestPath *)path { return MTREqualObjects(_endpoint, path.endpoint) - && MTREqualObjects(_cluster, path.cluster) - && MTREqualObjects(_attribute, path.attribute); + && MTREqualObjects(_cluster, path.cluster) + && MTREqualObjects(_attribute, path.attribute); } - (BOOL)isEqual:(id)object @@ -2373,13 +2373,13 @@ - (nullable instancetype)initWithCoder:(NSCoder *)decoder - (void)encodeWithCoder:(NSCoder *)coder { - if ( _endpoint ) { + if (_endpoint) { [coder encodeObject:_endpoint forKey:sEndpointIDKey]; } - if ( _cluster ) { + if (_cluster) { [coder encodeObject:_cluster forKey:sClusterIDKey]; } - if ( _attribute ) { + if (_attribute) { [coder encodeObject:_attribute forKey:sAttributeIDKey]; } } @@ -2400,8 +2400,8 @@ - (instancetype)initWithEndpointID:(NSNumber * _Nullable)endpointID - (NSString *)description { return [NSString stringWithFormat:@"", - (uint16_t) _endpoint.unsignedShortValue, (uint32_t) _cluster.unsignedLongValue, - (uint32_t) _event.unsignedLongValue]; + (uint16_t) _endpoint.unsignedShortValue, (uint32_t) _cluster.unsignedLongValue, + (uint32_t) _event.unsignedLongValue]; } + (MTREventRequestPath *)requestPathWithEndpointID:(NSNumber * _Nullable)endpointID @@ -2415,8 +2415,8 @@ + (MTREventRequestPath *)requestPathWithEndpointID:(NSNumber * _Nullable)endpoin - (BOOL)isEqualToEventRequestPath:(MTREventRequestPath *)path { return MTREqualObjects(_endpoint, path.endpoint) - && MTREqualObjects(_cluster, path.cluster) - && MTREqualObjects(_event, path.event); + && MTREqualObjects(_cluster, path.cluster) + && MTREqualObjects(_event, path.event); } - (BOOL)isEqual:(id)object @@ -2496,18 +2496,17 @@ - (nullable instancetype)initWithCoder:(NSCoder *)decoder - (void)encodeWithCoder:(NSCoder *)coder { - if ( _endpoint ) { + if (_endpoint) { [coder encodeObject:_endpoint forKey:sEventEndpointIDKey]; } - if ( _cluster ) { + if (_cluster) { [coder encodeObject:_cluster forKey:sEventClusterIDKey]; } - if ( _event ) { + if (_event) { [coder encodeObject:_event forKey:sEventAttributeIDKey]; } } - @end @implementation MTRClusterPath