@@ -2290,12 +2290,8 @@ + (MTRAttributeRequestPath *)requestPathWithEndpointID:(NSNumber * _Nullable)end
2290
2290
2291
2291
- (BOOL )isEqualToAttributeRequestPath : (MTRAttributeRequestPath *)path
2292
2292
{
2293
- if (!path)
2294
- return NO ;
2295
-
2296
- return (path.endpoint && [_endpoint isEqualToNumber: path.endpoint])
2297
- && (path.cluster && [_cluster isEqualToNumber: path.cluster])
2298
- && (path.attribute && [_attribute isEqualToNumber: path.attribute]);
2293
+ return [_endpoint isEqualToNumber: path.endpoint] && [_cluster isEqualToNumber: path.cluster] &&
2294
+ [_attribute isEqualToNumber: path.attribute];
2299
2295
}
2300
2296
2301
2297
- (BOOL )isEqual : (id )object
@@ -2366,12 +2362,8 @@ + (MTREventRequestPath *)requestPathWithEndpointID:(NSNumber * _Nullable)endpoin
2366
2362
2367
2363
- (BOOL )isEqualToEventRequestPath : (MTREventRequestPath *)path
2368
2364
{
2369
- if (!path)
2370
- return NO ;
2371
-
2372
- return (path.endpoint && [_endpoint isEqualToNumber: path.endpoint])
2373
- && (path.cluster && [_cluster isEqualToNumber: path.cluster])
2374
- && (path.event && [_event isEqualToNumber: path.event]);
2365
+ return
2366
+ [_endpoint isEqualToNumber: path.endpoint] && [_cluster isEqualToNumber: path.cluster] && [_event isEqualToNumber: path.event];
2375
2367
}
2376
2368
2377
2369
- (BOOL )isEqual : (id )object
@@ -2440,11 +2432,7 @@ ConcreteClusterPath path(static_cast<chip::EndpointId>([endpointID unsignedShort
2440
2432
2441
2433
- (BOOL )isEqualToClusterPath : (MTRClusterPath *)clusterPath
2442
2434
{
2443
- if (!clusterPath)
2444
- return NO ;
2445
-
2446
- return (clusterPath.endpoint && [_endpoint isEqualToNumber: clusterPath.endpoint])
2447
- && (clusterPath.cluster && [_cluster isEqualToNumber: clusterPath.cluster]);
2435
+ return [_endpoint isEqualToNumber: clusterPath.endpoint] && [_cluster isEqualToNumber: clusterPath.cluster];
2448
2436
}
2449
2437
2450
2438
- (BOOL )isEqual : (id )object
@@ -2532,10 +2520,7 @@ ConcreteDataAttributePath path(static_cast<chip::EndpointId>([endpointID unsigne
2532
2520
2533
2521
- (BOOL )isEqualToAttributePath : (MTRAttributePath *)attributePath
2534
2522
{
2535
- if (!attributePath)
2536
- return NO ;
2537
-
2538
- return [self isEqualToClusterPath: attributePath] && attributePath.attribute && [_attribute isEqualToNumber: attributePath.attribute];
2523
+ return [self isEqualToClusterPath: attributePath] && [_attribute isEqualToNumber: attributePath.attribute];
2539
2524
}
2540
2525
2541
2526
- (BOOL )isEqual : (id )object
@@ -2628,10 +2613,7 @@ ConcreteEventPath path(static_cast<chip::EndpointId>([endpointID unsignedShortVa
2628
2613
2629
2614
- (BOOL )isEqualToEventPath : (MTREventPath *)eventPath
2630
2615
{
2631
- if (!eventPath)
2632
- return NO ;
2633
-
2634
- return [self isEqualToClusterPath: eventPath] && eventPath.event && [_event isEqualToNumber: eventPath.event];
2616
+ return [self isEqualToClusterPath: eventPath] && [_event isEqualToNumber: eventPath.event];
2635
2617
}
2636
2618
2637
2619
- (BOOL )isEqual : (id )object
@@ -2721,10 +2703,7 @@ ConcreteCommandPath path(static_cast<chip::EndpointId>([endpointID unsignedShort
2721
2703
2722
2704
- (BOOL )isEqualToCommandPath : (MTRCommandPath *)commandPath
2723
2705
{
2724
- if (!commandPath)
2725
- return NO ;
2726
-
2727
- return [self isEqualToClusterPath: commandPath] && commandPath.command && [_command isEqualToNumber: commandPath.command];
2706
+ return [self isEqualToClusterPath: commandPath] && [_command isEqualToNumber: commandPath.command];
2728
2707
}
2729
2708
2730
2709
- (BOOL )isEqual : (id )object
0 commit comments