We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 1a1b9ad commit 4f58a62Copy full SHA for 4f58a62
Sources/OpenCoreGraphics/CGGeometry+Hashable.swift
@@ -0,0 +1,28 @@
1
+//
2
+// CGGeometry+Hashable.swift
3
+// OpenCoreGraphics
4
+
5
+#if !canImport(Darwin)
6
+// Foundation does not provide Hashable conformance for CG types yet.
7
+// See https://github.com/swiftlang/swift-corelibs-foundation/issues/5275
8
+extension CGPoint: Hashable {
9
+ public func hash(into hasher: inout Hasher) {
10
+ hasher.combine(x)
11
+ hasher.combine(y)
12
+ }
13
+}
14
15
+extension CGSize: Hashable {
16
17
+ hasher.combine(width)
18
+ hasher.combine(height)
19
20
21
22
+extension CGRect: Hashable {
23
24
+ hasher.combine(origin)
25
+ hasher.combine(size)
26
27
28
+#endif
0 commit comments