Use sets for dedupe

This commit is contained in:
Luke Noble 2022-10-30 16:11:03 +00:00
parent ff0c2a2fb5
commit 335420aba4
No known key found for this signature in database
GPG Key ID: 03AA6DA204DE950D
1 changed files with 3 additions and 3 deletions

View File

@ -858,7 +858,7 @@ extern UIImage* imageWithSize(UIImage* image, CGSize size);
} }
}]; }];
__block NSMutableArray* accessibleContainers = [NSMutableArray new]; __block NSMutableSet* accessibleContainers = [NSMutableSet new];
if(!unrestrictedContainerAccess) if(!unrestrictedContainerAccess)
{ {
[self enumerateAllInfoDictionaries:^(NSString *key, NSObject *value, BOOL *stop) { [self enumerateAllInfoDictionaries:^(NSString *key, NSObject *value, BOOL *stop) {
@ -898,7 +898,7 @@ extern UIImage* imageWithSize(UIImage* image, CGSize size);
// keychain-access-groups // keychain-access-groups
// Unrestricted if single * (maybe?) // Unrestricted if single * (maybe?)
__block BOOL unrestrictedKeychainAccess = NO; __block BOOL unrestrictedKeychainAccess = NO;
__block NSMutableArray* accessibleKeychainGroups = [NSMutableArray new]; __block NSMutableSet* accessibleKeychainGroups = [NSMutableSet new];
[self enumerateAllEntitlements:^(NSString *key, NSObject *value, BOOL *stop) { [self enumerateAllEntitlements:^(NSString *key, NSObject *value, BOOL *stop) {
if([key isEqualToString:@"keychain-access-groups"]) if([key isEqualToString:@"keychain-access-groups"])
{ {
@ -923,7 +923,7 @@ extern UIImage* imageWithSize(UIImage* image, CGSize size);
} }
}]; }];
__block NSMutableArray* URLSchemes = [NSMutableArray new]; __block NSMutableSet* URLSchemes = [NSMutableSet new];
[self enumerateAllInfoDictionaries:^(NSString *key, NSObject *value, BOOL *stop) { [self enumerateAllInfoDictionaries:^(NSString *key, NSObject *value, BOOL *stop) {
if([key isEqualToString:@"CFBundleURLTypes"]) if([key isEqualToString:@"CFBundleURLTypes"])
{ {