Skip to content

Commit

Permalink
Address further review comments for Darwin layer
Browse files Browse the repository at this point in the history
  • Loading branch information
ksperling-apple committed Jan 19, 2025
1 parent f8f68a6 commit a2e0df1
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/darwin/Framework/CHIP/MTRDeviceType.mm
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ - (NSNumber *)id

- (NSString *)name
{
return const_cast<NSString *>(_meta->name);
return _meta->name;
}

- (BOOL)isUtility
Expand Down
1 change: 1 addition & 0 deletions src/darwin/Framework/CHIP/MTREndpointInfo.mm
Original file line number Diff line number Diff line change
Expand Up @@ -164,6 +164,7 @@ + (BOOL)populateChildrenForEndpoints:(NSDictionary<NSNumber *, MTREndpointInfo *
NSArray<MTRDescriptorClusterDeviceTypeStruct *> * deviceTypeList = MTRDecodeAttributeValue(path, *cache, &err);
if (!deviceTypeList) {
MTR_LOG_ERROR("Ignoring invalid DeviceTypeList for endpoint %u: %" CHIP_ERROR_FORMAT, path.mEndpointId, err.Format());
// proceed with deviceTypeList == nil, equivalent to an empty list
}

NSMutableArray * deviceTypes = [[NSMutableArray alloc] initWithCapacity:deviceTypeList.count];
Expand Down

0 comments on commit a2e0df1

Please sign in to comment.