We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 3526a94 commit de759b7Copy full SHA for de759b7
SwiftDraw/CGPath+Segment.swift
@@ -41,9 +41,11 @@ import UIKit
41
extension CGPath {
42
func doApply(action: @escaping (CGPathElement)->()) {
43
var action = action
44
- apply(info: &action) {
45
- let action = $0!.bindMemory(to: ((CGPathElement)->()).self, capacity: 1).pointee
46
- action($1.pointee)
+ withUnsafeMutablePointer(to: &action) { action in
+ apply(info: action) {
+ let action = $0!.bindMemory(to: ((CGPathElement)->()).self, capacity: 1).pointee
47
+ action($1.pointee)
48
+ }
49
}
50
51
0 commit comments