Skip to content

Commit 30e8c8f

Browse files
committed
restyled
1 parent bed5f6d commit 30e8c8f

File tree

1 file changed

+12
-12
lines changed

1 file changed

+12
-12
lines changed

src/darwin/Framework/CHIP/MTRDeviceControllerDataStore.mm

+12-12
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727
#include <lib/support/SafeInt.h>
2828

2929
// Log error each time sync storage takes longer than this threshold
30-
#define SYNC_OPERATION_DURATION_LOG_THRESHOLD (2.0)
30+
#define SYNC_OPERATION_DURATION_LOG_THRESHOLD (2.0)
3131

3232
// FIXME: Are these good key strings? https://github.com/project-chip/connectedhomeip/issues/28973
3333
static NSString * sResumptionNodeListKey = @"caseResumptionNodeList";
@@ -137,7 +137,7 @@ - (nullable instancetype)initWithController:(MTRDeviceController *)controller
137137

138138
__block id resumptionNodeList;
139139
__block NSArray<NSNumber *> * nodesWithAttributeInfo;
140-
NSDate *startTime = [NSDate now];
140+
NSDate * startTime = [NSDate now];
141141
dispatch_sync(_storageDelegateQueue, ^{
142142
@autoreleasepool {
143143
// NOTE: controller, not our weak ref, since we know it's still
@@ -185,7 +185,7 @@ - (void)fetchAttributeDataForAllDevices:(MTRDeviceControllerDataStoreClusterData
185185
MTRDeviceController * controller = _controller;
186186
VerifyOrReturn(controller != nil); // No way to call delegate without controller.
187187

188-
NSDate *startTime = [NSDate now];
188+
NSDate * startTime = [NSDate now];
189189
dispatch_sync(_storageDelegateQueue, ^{
190190
if ([self->_storageDelegate respondsToSelector:@selector(valuesForController:securityLevel:sharingType:)]) {
191191
dataStoreSecureLocalValues = [self->_storageDelegate valuesForController:controller securityLevel:MTRStorageSecurityLevelSecure sharingType:MTRStorageSharingTypeNotShared];
@@ -217,7 +217,7 @@ - (void)storeResumptionInfo:(MTRCASESessionResumptionInfo *)resumptionInfo
217217
VerifyOrReturn(controller != nil); // No way to call delegate without controller.
218218

219219
auto * oldInfo = [self findResumptionInfoByNodeID:resumptionInfo.nodeID];
220-
NSDate *startTime = [NSDate now];
220+
NSDate * startTime = [NSDate now];
221221
dispatch_sync(_storageDelegateQueue, ^{
222222
if (oldInfo != nil) {
223223
// Remove old resumption id key. No need to do that for the
@@ -292,7 +292,7 @@ - (void)_clearResumptionInfoForNodeID:(NSNumber *)nodeID controller:(MTRDeviceCo
292292
{
293293
auto * oldInfo = [self findResumptionInfoByNodeID:nodeID];
294294
if (oldInfo != nil) {
295-
NSDate *startTime = [NSDate now];
295+
NSDate * startTime = [NSDate now];
296296
dispatch_sync(_storageDelegateQueue, ^{
297297
[_storageDelegate controller:controller
298298
removeValueForKey:ResumptionByResumptionIDKey(oldInfo.resumptionID)
@@ -307,7 +307,7 @@ - (void)_clearResumptionInfoForNodeID:(NSNumber *)nodeID controller:(MTRDeviceCo
307307
if (syncDuration > SYNC_OPERATION_DURATION_LOG_THRESHOLD) {
308308
MTR_LOG_ERROR("MTRDeviceControllerDataStore _clearResumptionInfoForNodeID took %0.6lf seconds to remove from storage", syncDuration);
309309
}
310-
}
310+
}
311311
}
312312

313313
- (CHIP_ERROR)storeLastLocallyUsedNOC:(MTRCertificateTLVBytes)noc
@@ -316,7 +316,7 @@ - (CHIP_ERROR)storeLastLocallyUsedNOC:(MTRCertificateTLVBytes)noc
316316
VerifyOrReturnError(controller != nil, CHIP_ERROR_PERSISTED_STORAGE_FAILED); // No way to call delegate without controller.
317317

318318
__block BOOL ok;
319-
NSDate *startTime = [NSDate now];
319+
NSDate * startTime = [NSDate now];
320320
dispatch_sync(_storageDelegateQueue, ^{
321321
ok = [_storageDelegate controller:controller
322322
storeValue:noc
@@ -337,7 +337,7 @@ - (MTRCertificateTLVBytes _Nullable)fetchLastLocallyUsedNOC
337337
VerifyOrReturnValue(controller != nil, nil); // No way to call delegate without controller.
338338

339339
__block id data;
340-
NSDate *startTime = [NSDate now];
340+
NSDate * startTime = [NSDate now];
341341
dispatch_sync(_storageDelegateQueue, ^{
342342
@autoreleasepool {
343343
data = [_storageDelegate controller:controller
@@ -373,7 +373,7 @@ - (nullable MTRCASESessionResumptionInfo *)_findResumptionInfoWithKey:(nullable
373373
}
374374

375375
__block id resumptionInfo;
376-
NSDate *startTime = [NSDate now];
376+
NSDate * startTime = [NSDate now];
377377
dispatch_sync(_storageDelegateQueue, ^{
378378
@autoreleasepool {
379379
resumptionInfo = [_storageDelegate controller:controller
@@ -904,7 +904,7 @@ - (void)clearAllStoredClusterData
904904
}
905905

906906
__block NSMutableDictionary<MTRClusterPath *, MTRDeviceClusterData *> * clusterDataToReturn = nil;
907-
NSDate *startTime = [NSDate now];
907+
NSDate * startTime = [NSDate now];
908908
dispatch_sync(_storageDelegateQueue, ^{
909909
std::lock_guard lock(self->_nodeArrayLock);
910910

@@ -977,7 +977,7 @@ - (nullable MTRDeviceClusterData *)getStoredClusterDataForNodeID:(NSNumber *)nod
977977
// when the consumer knows that we're supposed to have data for this cluster
978978
// path.
979979
__block MTRDeviceClusterData * clusterDataToReturn = nil;
980-
NSDate *startTime = [NSDate now];
980+
NSDate * startTime = [NSDate now];
981981
dispatch_sync(_storageDelegateQueue, ^{
982982
clusterDataToReturn = [self _fetchClusterDataForNodeID:nodeID endpointID:endpointID clusterID:clusterID];
983983
});
@@ -1221,7 +1221,7 @@ - (NSString *)_deviceDataKeyForNodeID:(NSNumber *)nodeID
12211221
- (nullable NSDictionary<NSString *, id> *)getStoredDeviceDataForNodeID:(NSNumber *)nodeID
12221222
{
12231223
__block NSDictionary<NSString *, id> * deviceData = nil;
1224-
NSDate *startTime = [NSDate now];
1224+
NSDate * startTime = [NSDate now];
12251225
dispatch_sync(_storageDelegateQueue, ^{
12261226
MTRDeviceController * controller = self->_controller;
12271227
VerifyOrReturn(controller != nil); // No way to call delegate without controller.

0 commit comments

Comments
 (0)