Skip to content

Commit 6eec5b9

Browse files
committed
Make CGSize conform to Equatable protocol
1 parent 99f9cbe commit 6eec5b9

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

Foundation/NSGeometry.swift

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,12 @@ public struct CGSize {
6969
}
7070
}
7171

72+
extension CGSize: Equatable { }
73+
74+
public func ==(lhs: CGSize, rhs: CGSize) -> Bool {
75+
return (lhs.width == rhs.width) && (lhs.height == lhs.height)
76+
}
77+
7278
public struct CGRect {
7379
public var origin: CGPoint
7480
public var size: CGSize

0 commit comments

Comments
 (0)