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 woody-apple committed Sep 13, 2024
1 parent f3ad99e commit 0417aa7
Showing 1 changed file with 14 additions and 15 deletions.
29 changes: 14 additions & 15 deletions src/darwin/Framework/CHIP/MTRBaseDevice.mm
Original file line number Diff line number Diff line change
Expand Up @@ -2276,8 +2276,8 @@ - (instancetype)initWithEndpointID:(NSNumber * _Nullable)endpointID
- (NSString *)description
{
return [NSString stringWithFormat:@"<MTRAttributeRequestPath endpoint %u cluster %u attribute %u>",
(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
Expand All @@ -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
Expand Down Expand Up @@ -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];
}
}
Expand All @@ -2400,8 +2400,8 @@ - (instancetype)initWithEndpointID:(NSNumber * _Nullable)endpointID
- (NSString *)description
{
return [NSString stringWithFormat:@"<MTREventRequestPath endpoint %u cluster %u event %u>",
(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
Expand All @@ -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
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 0417aa7

Please sign in to comment.