Upsurge icon indicating copy to clipboard operation
Upsurge copied to clipboard

Missing Argument

Open FrenchBully opened this issue 6 years ago • 4 comments

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.

FrenchBully avatar Dec 14 '18 20:12 FrenchBully

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.

halmueller avatar Dec 14 '18 21:12 halmueller

Unfortunately Upsurge requires Xcode 10 and Swift 4.1. But you can still use an older release.

alejandro-isaza avatar Dec 14 '18 21:12 alejandro-isaza

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

halmueller avatar Dec 14 '18 21:12 halmueller

ah, thanks guys. I had this implemented in a really old project. I'll try to roll back to an older release.

FrenchBully avatar Dec 14 '18 21:12 FrenchBully