Skip to content

Commit d5baea5

Browse files
committed
Address 32-bit issue in computation of hash
1 parent be85d0a commit d5baea5

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

Foundation/NSGeometry.swift

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,11 @@ public struct CGFloat {
3333
public var native: NativeType
3434

3535
private var hash: Int {
36+
#if arch(i386) || arch(arm)
37+
return Int(Float(self.native)._toBitPattern())
38+
#else
3639
return Int(self.native._toBitPattern())
40+
#endif
3741
}
3842
}
3943

0 commit comments

Comments
 (0)