@@ -2802,8 +2802,8 @@ - (void)_pruneOrphanedEndpointsAndClusters:(MTRAttributePath *)attributePath
2802
2802
// If the server list changed and clusters were removed, remove the clusters from the _persistedClusters and _persistedClusterData for that endpoint
2803
2803
// Also remove it from the data store.
2804
2804
case MTRAttributeIDTypeClusterDescriptorAttributeServerListID: {
2805
- NSMutableSet * toBeRemovedClusters = [NSMutableSet setWithArray:[self arrayOfNumbersFromAttributeValue:previousValue]];
2806
- NSSet * clustersOnDevice = [NSSet setWithArray:[self arrayOfNumbersFromAttributeValue:attributeDataValue]];
2805
+ NSMutableSet<NSNumber *> * toBeRemovedClusters = [NSMutableSet setWithArray:[self arrayOfNumbersFromAttributeValue:previousValue]];
2806
+ NSSet<NSNumber *> * clustersStillOnEndpoint = [NSSet setWithArray:[self arrayOfNumbersFromAttributeValue:attributeDataValue]];
2807
2807
[toBeRemovedClusters minusSet:clustersOnDevice];
2808
2808
2809
2809
NSMutableSet<MTRClusterPath *> * clusterPathsToRemove = [[NSMutableSet alloc] init];
@@ -2827,8 +2827,8 @@ - (void)_pruneOrphanedEndpointsAndClusters:(MTRAttributePath *)attributePath
2827
2827
// If the attribute list changed and attributes were removed, remove the attributes from the _persistedClusterData for that cluster and endpoint.
2828
2828
// Also remove it from the data store cluster data.
2829
2829
case MTRAttributeIDTypeGlobalAttributeAttributeListID: {
2830
- NSMutableSet * toBeRemovedAttributes = [NSMutableSet setWithArray:[self arrayOfNumbersFromAttributeValue:[self _cachedAttributeValueForPath:attributePath]]];
2831
- NSSet * attributesOnDevice = [NSSet setWithArray:[self arrayOfNumbersFromAttributeValue:attributeDataValue]];
2830
+ NSMutableSet<NSNumber *> * toBeRemovedAttributes = [NSMutableSet setWithArray:[self arrayOfNumbersFromAttributeValue:[self _cachedAttributeValueForPath:attributePath]]];
2831
+ NSSet<NSNumber *> * attributesStillIncluster = [NSSet setWithArray:[self arrayOfNumbersFromAttributeValue:attributeDataValue]];
2832
2832
2833
2833
[toBeRemovedAttributes minusSet:attributesOnDevice];
2834
2834
for (NSNumber * attribute in toBeRemovedAttributes) {
0 commit comments