Skip to content

Commit

Permalink
Darwin: MTRDeviceControllerFactory cleanup (#32960)
Browse files Browse the repository at this point in the history
* Darwin: MTRDeviceControllerFactory cleanup

Internal methods don't need a named category
Use ivars directly (most internal properties were never used as properties)
Use MTR_DIRECT_MEMBERS for internals / implementation
No need to pre-declare internal methods used only with the same file

* Darwin: MTRDeviceControllerFactory cleanup (cont)

Reorder ivars a little to group related things

* Darwin: MTRDeviceControllerFactory cleanup (cont)

Allocate C++ objects that are created at init time directly as ivars instead of
as pointers. This avoids the need for manual cleanup code.

* Fix darwin-framework-tool link issue

* restyle
  • Loading branch information
ksperling-apple authored Apr 16, 2024
1 parent 12005f1 commit 0c17072
Show file tree
Hide file tree
Showing 3 changed files with 113 additions and 187 deletions.
2 changes: 1 addition & 1 deletion src/darwin/Framework/CHIP/MTRDeviceController.mm
Original file line number Diff line number Diff line change
Expand Up @@ -551,7 +551,7 @@ - (BOOL)startup:(MTRDeviceControllerStartupParamsInternal *)startupParams
}

errorCode = chip::Credentials::SetSingleIpkEpochKey(
_factory.groupData, fabricIdx, _operationalCredentialsDelegate->GetIPK(), compressedId);
_factory.groupDataProvider, fabricIdx, _operationalCredentialsDelegate->GetIPK(), compressedId);
if ([self checkForStartError:errorCode logMsg:kErrorIPKInit]) {
return;
}
Expand Down
Loading

0 comments on commit 0c17072

Please sign in to comment.