Skip to content

Commit

Permalink
Restyled by clang-format
Browse files Browse the repository at this point in the history
  • Loading branch information
restyled-commits committed Jul 8, 2022
1 parent c219a45 commit ccfc173
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions src/darwin/Framework/CHIP/MTRDeviceController.mm
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,10 @@
#import "MTRBaseDevice_Internal.h"
#import "MTRCommissioningParameters.h"
#import "MTRControllerFactory_Internal.h"
#import "MTRDevice_Internal.h"
#import "MTRDeviceControllerStartupParams.h"
#import "MTRDeviceControllerStartupParams_Internal.h"
#import "MTRDevicePairingDelegateBridge.h"
#import "MTRDevice_Internal.h"
#import "MTRError_Internal.h"
#import "MTRKeypair.h"
#import "MTRLogging.h"
Expand Down Expand Up @@ -532,9 +532,10 @@ - (BOOL)getBaseDevice:(uint64_t)deviceID
return YES;
}

- (MTRDevice *)deviceForDeviceID:(uint64_t)deviceID {
- (MTRDevice *)deviceForDeviceID:(uint64_t)deviceID
{
os_unfair_lock_lock(&_deviceMapLock);
MTRDevice *deviceToReturn = self.deviceIDToDeviceMap[@(deviceID)];
MTRDevice * deviceToReturn = self.deviceIDToDeviceMap[@(deviceID)];
if (deviceToReturn) {
deviceToReturn = [[MTRDevice alloc] initWithDeviceID:deviceID deviceController:self queue:self.chipWorkQueue];
self.deviceIDToDeviceMap[@(deviceID)] = deviceToReturn;
Expand All @@ -544,9 +545,10 @@ - (MTRDevice *)deviceForDeviceID:(uint64_t)deviceID {
return deviceToReturn;
}

- (void)removeDevice:(MTRDevice *)device {
- (void)removeDevice:(MTRDevice *)device
{
os_unfair_lock_lock(&_deviceMapLock);
MTRDevice *deviceToRemove = self.deviceIDToDeviceMap[@(device.deviceID)];
MTRDevice * deviceToRemove = self.deviceIDToDeviceMap[@(device.deviceID)];
if (deviceToRemove == device) {
self.deviceIDToDeviceMap[@(device.deviceID)] = nil;
} else {
Expand Down

0 comments on commit ccfc173

Please sign in to comment.