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 ready2die4u committed Jan 9, 2023
1 parent 9b7b82f commit 1233799
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 14 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -221,8 +221,7 @@ class SubscribeEvent : public ModelCommand {
params.resubscribeIfLost = mAutoResubscribe.Value();
}

if (mClusterId != chip::kInvalidAttributeId)
{
if (mClusterId != chip::kInvalidAttributeId) {
NSNumber * eventMin = (mEventNumber.HasValue()) ? [NSNumber numberWithUnsignedLongLong:mEventNumber.Value()] : nil;
NSNumber * isUrgent = (mIsUrgent.HasValue()) ? [NSNumber numberWithBool:mIsUrgent.Value()] : nil;

Expand All @@ -244,9 +243,7 @@ class SubscribeEvent : public ModelCommand {
subscriptionEstablished:^() {
mSubscriptionEstablished = YES;
}];
}
else
{
} else {
[device subscribeWithQueue:callbackQueue
params:params
clusterStateCacheContainer:nil
Expand Down
3 changes: 1 addition & 2 deletions src/darwin/Framework/CHIP/MTRBaseDevice.h
Original file line number Diff line number Diff line change
Expand Up @@ -358,8 +358,7 @@ typedef NS_ENUM(uint8_t, MTRTransportType) {
params:(MTRSubscribeParams * _Nullable)params
queue:(dispatch_queue_t)queue
reportHandler:(MTRDeviceResponseHandler)reportHandler
subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished
MTR_NEWLY_AVAILABLE;
subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished MTR_NEWLY_AVAILABLE;
@end

/**
Expand Down
12 changes: 5 additions & 7 deletions src/darwin/Framework/CHIP/MTRBaseDevice.mm
Original file line number Diff line number Diff line change
Expand Up @@ -1697,10 +1697,8 @@ - (void)subscribeToEventsWithEndpointID:(NSNumber * _Nullable)endpointID
id valueObject = data.GetDecodedObject();
app::ConcreteEventPath pathCopy = eventPath;
dispatch_async(queue, ^{
reportHandler(@[ @ {
MTREventPathKey : [[MTREventPath alloc] initWithPath:pathCopy],
MTRDataKey : valueObject
} ],
reportHandler(
@[ @ { MTREventPathKey : [[MTREventPath alloc] initWithPath:pathCopy], MTRDataKey : valueObject } ],
nil);
});
};
Expand Down Expand Up @@ -2028,9 +2026,9 @@ - (instancetype)initWithPath:(const ConcreteEventPath &)path

- (NSString *)description
{
return [NSString stringWithFormat:@"<MTREventPath> endpoint %u cluster %u event %u",
(uint16_t) self.endpoint.unsignedShortValue, (uint32_t) self.cluster.unsignedLongValue,
(uint32_t)_event.unsignedLongValue];
return
[NSString stringWithFormat:@"<MTREventPath> endpoint %u cluster %u event %u", (uint16_t) self.endpoint.unsignedShortValue,
(uint32_t) self.cluster.unsignedLongValue, (uint32_t) _event.unsignedLongValue];
}

+ (instancetype)eventPathWithEndpointID:(NSNumber *)endpointID clusterID:(NSNumber *)clusterID eventID:(NSNumber *)eventID
Expand Down

0 comments on commit 1233799

Please sign in to comment.