Bugfix CoreGraphics

This commit is contained in:
Daniel Arantes Loverde
2025-03-23 00:37:11 -03:00
parent 8f8cffc8ba
commit 6040caa2de
6 changed files with 5 additions and 431 deletions

View File

@@ -21,9 +21,11 @@
import Foundation
#if canImport(CoreGraphics)
import CoreGraphics
#if canImport(SwiftUI)
extension CGPoint: Hashable {
extension CGPoint: @retroactive Hashable {
// Implementação manual de Hashable
public func hash(into hasher: inout Hasher) {
hasher.combine(x)
@@ -35,3 +37,4 @@ extension CGPoint: Hashable {
}
}
#endif
#endif

View File

@@ -30,7 +30,7 @@ public extension CGRect {
var center: CGPoint { CGPoint(x: midX, y: midY) }
}
#if canImport(SwiftUI)
extension CGRect: Hashable {
extension CGRect: @retroactive Hashable {
// Implementação manual de Hashable
public func hash(into hasher: inout Hasher) {
hasher.combine(origin)