Skip to content

Commit

Permalink
CG types are sendable
Browse files Browse the repository at this point in the history
  • Loading branch information
jumhyn-browser committed Feb 16, 2024
1 parent 7f62c8c commit d5c78dc
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion Sources/Foundation/CGFloat.swift
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
//

@frozen
public struct CGFloat {
public struct CGFloat: Sendable {
#if arch(i386) || arch(arm) || arch(wasm32)
/// The native type used to store the CGFloat, which is Float on
/// 32-bit architectures and Double on 64-bit architectures.
Expand Down
14 changes: 7 additions & 7 deletions Sources/Foundation/NSGeometry.swift
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
// See http://swift.org/CONTRIBUTORS.txt for the list of Swift project authors
//

public struct CGPoint {
public struct CGPoint: Sendable {
public var x: CGFloat
public var y: CGFloat
public init() {
Expand Down Expand Up @@ -100,7 +100,7 @@ extension CGPoint : Codable {
}
}

public struct CGSize {
public struct CGSize: Sendable {
public var width: CGFloat
public var height: CGFloat
public init() {
Expand Down Expand Up @@ -193,7 +193,7 @@ extension CGSize : Codable {
}
}

public struct CGRect {
public struct CGRect: Sendable {
public var origin: CGPoint
public var size: CGSize
public init() {
Expand Down Expand Up @@ -501,15 +501,15 @@ extension CGRect: NSSpecialValueCoding {
}
}

public enum NSRectEdge : UInt {
public enum NSRectEdge : UInt, Sendable {

case minX
case minY
case maxX
case maxY
}

public enum CGRectEdge : UInt32 {
public enum CGRectEdge : UInt32, Sendable {

case minXEdge
case minYEdge
Expand All @@ -529,7 +529,7 @@ extension NSRectEdge {
}


public struct NSEdgeInsets {
public struct NSEdgeInsets: Sendable {
public var top: CGFloat
public var left: CGFloat
public var bottom: CGFloat
Expand Down Expand Up @@ -604,7 +604,7 @@ extension NSEdgeInsets: NSSpecialValueCoding {
}
}

public struct AlignmentOptions : OptionSet {
public struct AlignmentOptions : OptionSet, Sendable {
public var rawValue : UInt64
public init(rawValue: UInt64) { self.rawValue = rawValue }

Expand Down

0 comments on commit d5c78dc

Please sign in to comment.