Skip to content

Commit 364a2eb

Browse files
committed
make nil case possibility more obvious
1 parent 8a5d306 commit 364a2eb

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

src/darwin/Framework/CHIP/MTRDevice.mm

+3-4
Original file line numberDiff line numberDiff line change
@@ -3653,7 +3653,7 @@ - (void)removeClientDataForKey:(NSString *)key endpointID:(NSNumber *)endpointID
36533653

36543654
#pragma mark Log Help
36553655

3656-
- (NSNumber *)_informationalNumberAtAttributePath:(MTRAttributePath *)attributePath
3656+
- (nullable NSNumber *)_informationalNumberAtAttributePath:(MTRAttributePath *)attributePath
36573657
{
36583658
auto * cachedData = [self _cachedAttributeValueForPath:attributePath];
36593659

@@ -3662,12 +3662,11 @@ - (NSNumber *)_informationalNumberAtAttributePath:(MTRAttributePath *)attributeP
36623662
MTRDataKey : cachedData,
36633663
}
36643664
error:nil];
3665-
// REVIEWERS: is it worth logging the `error` above?
36663665

36673666
return attrReport.value;
36683667
}
36693668

3670-
- (NSNumber *)_informationalVendorID
3669+
- (nullable NSNumber *)_informationalVendorID
36713670
{
36723671
auto * vendorIDPath = [MTRAttributePath attributePathWithEndpointID:@(kRootEndpointId)
36733672
clusterID:@(MTRClusterIDTypeBasicInformationID)
@@ -3676,7 +3675,7 @@ - (NSNumber *)_informationalVendorID
36763675
return [self _informationalNumberAtAttributePath:vendorIDPath];
36773676
}
36783677

3679-
- (NSNumber *)_informationalProductID
3678+
- (nullable NSNumber *)_informationalProductID
36803679
{
36813680
auto * productIDPath = [MTRAttributePath attributePathWithEndpointID:@(kRootEndpointId)
36823681
clusterID:@(MTRClusterIDTypeBasicInformationID)

0 commit comments

Comments
 (0)