Skip to content

Commit aaf8168

Browse files
authored
Fix NSRect init invocation on 32bit platforms
CGFloat's init will maintain the correct NativeType for the current platform type.
1 parent 95b8e5c commit aaf8168

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Foundation/NSGeometry.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -704,7 +704,7 @@ public func NSInsetRect(_ aRect: NSRect, _ dX: CGFloat, _ dY: CGFloat) -> NSRect
704704
let y = aRect.origin.y.native + dY.native
705705
let w = aRect.size.width.native - (dX.native * 2)
706706
let h = aRect.size.height.native - (dY.native * 2)
707-
return NSRect(x: x, y: y, width: w, height: h)
707+
return NSRect(x: CGFloat(x), y: CGFloat(y), width: CGFloat(w), height: CGFloat(h))
708708
}
709709

710710
public func NSIntegralRect(_ aRect: NSRect) -> NSRect {

0 commit comments

Comments
 (0)