mirror of
https://github.com/SideStore/SideStore.git
synced 2026-02-08 22:33:26 +01:00
[AltStoreCore] Fixes “any ALTAppPermission cannot conform to 'Hashable’” Xcode 15 compiler error
This commit is contained in:
@@ -195,11 +195,14 @@ open class MergePolicy: RSTRelationshipPreservingMergePolicy
|
||||
|
||||
// Permissions
|
||||
let contextPermissions = Set(contextApp._permissions.lazy.compactMap { $0 as? AppPermission }.map { AnyHashable($0.permission) })
|
||||
for case let databasePermission as AppPermission in databaseObject._permissions where !contextPermissions.contains(AnyHashable(databasePermission.permission))
|
||||
for case let databasePermission as AppPermission in databaseObject._permissions /* where !contextPermissions.contains(AnyHashable(databasePermission.permission)) */ // Compiler error as of Xcode 15
|
||||
{
|
||||
if !contextPermissions.contains(AnyHashable(databasePermission.permission))
|
||||
{
|
||||
// Permission does NOT exist in context, so delete existing databasePermission.
|
||||
databasePermission.managedObjectContext?.delete(databasePermission)
|
||||
}
|
||||
}
|
||||
|
||||
// Versions
|
||||
let contextVersionIDs = NSOrderedSet(array: contextApp._versions.lazy.compactMap { $0 as? AppVersion }.map { $0.versionID })
|
||||
|
||||
Reference in New Issue
Block a user