File tree Expand file tree Collapse file tree 3 files changed +9
-8
lines changed Expand file tree Collapse file tree 3 files changed +9
-8
lines changed Original file line number Diff line number Diff line change @@ -517,7 +517,7 @@ extension CGAffineTransform : Codable {
517
517
518
518
extension CGImage {
519
519
public func copy( maskingColorComponents components: [ CGFloat ] ) -> CGImage ? {
520
- return self . __copy ( maskingColorComponents: UnsafePointer ( components) )
520
+ return self . __copy ( maskingColorComponents: components)
521
521
}
522
522
}
523
523
Original file line number Diff line number Diff line change @@ -100,10 +100,11 @@ extension MTLDevice {
100
100
@available ( swift 4 )
101
101
@available ( macOS 10 . 13 , * )
102
102
public func MTLCopyAllDevicesWithObserver( handler: @escaping MTLDeviceNotificationHandler ) -> ( devices: [ MTLDevice ] , observer: NSObject ) {
103
- var resultTuple : ( devices: [ MTLDevice ] , observer: NSObject )
104
- resultTuple. observer = NSObject ( )
105
- resultTuple. devices = __MTLCopyAllDevicesWithObserver ( AutoreleasingUnsafeMutablePointer < NSObjectProtocol ? > ( & resultTuple. observer) , handler)
106
- return resultTuple
103
+ var observer : NSObjectProtocol ?
104
+ let devices = __MTLCopyAllDevicesWithObserver ( & observer, handler)
105
+ // FIXME: The force cast here isn't great – ideally we would return the
106
+ // observer as an NSObjectProtocol.
107
+ return ( devices, observer as! NSObject )
107
108
}
108
109
#endif
109
110
Original file line number Diff line number Diff line change @@ -179,15 +179,15 @@ extension SCNGeometryElement {
179
179
extension SCNGeometrySource {
180
180
@nonobjc
181
181
public convenience init(vertices: [SCNVector3]) {
182
- self.init(vertices: UnsafePointer( vertices) , count: vertices.count)
182
+ self.init(vertices: vertices, count: vertices.count)
183
183
}
184
184
@nonobjc
185
185
public convenience init(normals: [SCNVector3]) {
186
- self.init(normals: UnsafePointer( normals) , count: normals.count)
186
+ self.init(normals: normals, count: normals.count)
187
187
}
188
188
@nonobjc
189
189
public convenience init(textureCoordinates: [CGPoint]) {
190
- self.init(textureCoordinates: UnsafePointer( textureCoordinates) , count: textureCoordinates.count)
190
+ self.init(textureCoordinates: textureCoordinates, count: textureCoordinates.count)
191
191
}
192
192
}
193
193
You can’t perform that action at this time.
0 commit comments