Upsurge
Upsurge copied to clipboard
Missing Argument
Can't seem to figure out why this is missing. Any ideas? Can't build the app.
Running Xcode 9.2, target Swift 4.0
Upsurge/ValueArray.swift:134:35: error: missing argument for parameter 'capacity' in call mutablePointer.deallocate() ^
Thank you.
Per https://developer.apple.com/documentation/swift/unsafemutablepointer/2295090-deallocate https://developer.apple.com/documentation/swift/unsafemutablepointer/2295090-deallocate you need a capacity: parameter to the deallocate() call.
Note that call is also marked as deprecated, so you may have some maintenance to do.
Hal
On Dec 14, 2018, at 12:45 PM, Kevin [email protected] wrote:
Can't seem to figure out why this is missing. Any ideas? Can't build the app.
Running Xcode 9.2, target Swift 4.0
Upsurge/ValueArray.swift:134:35: error: missing argument for parameter 'capacity' in call mutablePointer.deallocate() ^
Thank you.
— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/alejandro-isaza/Upsurge/issues/100, or mute the thread https://github.com/notifications/unsubscribe-auth/AAZg17KayG3h__NyKE87w63poh1qlQSRks5u5A4EgaJpZM4ZUPhC.
Unfortunately Upsurge requires Xcode 10 and Swift 4.1. But you can still use an older release.
Ah, got it! Reference is https://developer.apple.com/documentation/swift/unsafemutablepointer#topics https://developer.apple.com/documentation/swift/unsafemutablepointer#topics.
deallocate(pointer:) became simply deallocate() (as of Xcode 9.3).
I just confirmed clean build, all tests passing on Xcode 10.1. OP just needs to use current tools and all will be well.
Hal
ah, thanks guys. I had this implemented in a really old project. I'll try to roll back to an older release.