From a355e9f987b759094782dfdfcb73500fa5257f83 Mon Sep 17 00:00:00 2001 From: Karsten Sperling <113487422+ksperling-apple@users.noreply.github.com> Date: Mon, 23 Dec 2024 10:53:08 +1300 Subject: [PATCH] Apply suggestions from code review Co-authored-by: Boris Zbarsky --- src/darwin/Framework/CHIP/MTRCommissioningParameters.h | 2 +- src/darwin/Framework/CHIP/MTRDeviceControllerDelegateBridge.mm | 2 +- src/darwin/Framework/CHIP/MTREndpointInfo.mm | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/darwin/Framework/CHIP/MTRCommissioningParameters.h b/src/darwin/Framework/CHIP/MTRCommissioningParameters.h index cf50a9f506f226..3dcd1efc53dcac 100644 --- a/src/darwin/Framework/CHIP/MTRCommissioningParameters.h +++ b/src/darwin/Framework/CHIP/MTRCommissioningParameters.h @@ -100,7 +100,7 @@ MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) * Read device type information from all endpoints during commissioning. * Defaults to NO. */ -@property (nonatomic, assign) BOOL readEndpointInformation; +@property (nonatomic, assign) BOOL readEndpointInformation MTR_NEWLY_AVAILABLE; @end diff --git a/src/darwin/Framework/CHIP/MTRDeviceControllerDelegateBridge.mm b/src/darwin/Framework/CHIP/MTRDeviceControllerDelegateBridge.mm index 4228bdd4c14f2d..664f2eee1ad024 100644 --- a/src/darwin/Framework/CHIP/MTRDeviceControllerDelegateBridge.mm +++ b/src/darwin/Framework/CHIP/MTRDeviceControllerDelegateBridge.mm @@ -150,7 +150,7 @@ - (MTREndpointInfo *)rootEndpoint { MTRDeviceController * strongController = mController; id strongDelegate = mDelegate; - VerifyOrReturn(strongDelegate && mQueue); + VerifyOrReturn(strongDelegate && mQueue && strongController); // TODO: These checks are pointless since currently mController == mDelegate BOOL wantCommissioneeInfo = [strongDelegate respondsToSelector:@selector(controller:readCommissioneeInfo:)]; diff --git a/src/darwin/Framework/CHIP/MTREndpointInfo.mm b/src/darwin/Framework/CHIP/MTREndpointInfo.mm index 0eb5adfe7602d4..ca0c6ec3340205 100644 --- a/src/darwin/Framework/CHIP/MTREndpointInfo.mm +++ b/src/darwin/Framework/CHIP/MTREndpointInfo.mm @@ -118,7 +118,7 @@ + (BOOL)populateChildrenForEndpoints:(NSDictionary * children = [[NSMutableArray alloc] init];