@@ -39,7 +39,7 @@ extension CGPoint: Equatable {
39
39
}
40
40
}
41
41
42
- extension CGPoint : NSSpecialValueCoding {
42
+ extension CGPoint : NSSpecialValueCoding , Hashable {
43
43
init ( bytes: UnsafeRawPointer ) {
44
44
self . x = bytes. load ( as: CGFloat . self)
45
45
self . y = bytes. load ( fromByteOffset: MemoryLayout< CGFloat> . stride, as: CGFloat . self)
@@ -75,7 +75,7 @@ extension CGPoint: NSSpecialValueCoding {
75
75
}
76
76
}
77
77
78
- func hash( into hasher: inout Hasher ) {
78
+ public func hash( into hasher: inout Hasher ) {
79
79
hasher. combine ( x)
80
80
hasher. combine ( y)
81
81
}
@@ -132,7 +132,7 @@ extension CGSize: Equatable {
132
132
}
133
133
}
134
134
135
- extension CGSize : NSSpecialValueCoding {
135
+ extension CGSize : NSSpecialValueCoding , Hashable {
136
136
init ( bytes: UnsafeRawPointer ) {
137
137
self . width = bytes. load ( as: CGFloat . self)
138
138
self . height = bytes. load ( fromByteOffset: MemoryLayout< CGFloat> . stride, as: CGFloat . self)
@@ -168,7 +168,7 @@ extension CGSize: NSSpecialValueCoding {
168
168
}
169
169
}
170
170
171
- func hash( into hasher: inout Hasher ) {
171
+ public func hash( into hasher: inout Hasher ) {
172
172
hasher. combine ( width)
173
173
hasher. combine ( height)
174
174
}
@@ -451,7 +451,7 @@ public typealias NSRect = CGRect
451
451
public typealias NSRectPointer = UnsafeMutablePointer < NSRect >
452
452
public typealias NSRectArray = UnsafeMutablePointer < NSRect >
453
453
454
- extension CGRect : NSSpecialValueCoding {
454
+ extension CGRect : NSSpecialValueCoding , Hashable {
455
455
init ( bytes: UnsafeRawPointer ) {
456
456
self . origin = CGPoint (
457
457
x: bytes. load ( as: CGFloat . self) ,
@@ -491,7 +491,7 @@ extension CGRect: NSSpecialValueCoding {
491
491
}
492
492
}
493
493
494
- func hash( into hasher: inout Hasher ) {
494
+ public func hash( into hasher: inout Hasher ) {
495
495
origin. hash ( into: & hasher)
496
496
size. hash ( into: & hasher)
497
497
}
0 commit comments