unsafe mutable pointers
Closed this issue · 6 comments
I'm getting 6 compilation errors when I try to compile this on swift 3.0 ios 10
Cannot convert value of type 'UnsafePointer<_>' to expected argument type 'UnsafeMutableRawPointer!'
Any thoughts?
As much as I love the language I hate the way Swift does pointers and it seems like every release they change it. On Xcode 8.1 where you are getting the errors change withUnsafePointer to withUnsafeMutablePointer.
Hi in viewcontroller+OpenGL
I’ve fixed (I think) 3 three of them by converting but what’s left is three instances of
withUnsafePointer(to: &colorCameraPoseInDepthCoordinateSpace, {
$0.withMemoryRebound(to: Float.self, capacity: 16, {
depthFrame.colorCameraPose(inDepthCoordinateFrame: $0)
})
})
it’s the depthframe.colorCameraPose it doesn't like
I commented them out and it compiled and worked but I got no bounding cube showing.
I don't think that’s the same issue though
On Nov 3, 2016, at 11:29 AM, Christopher Worley notifications@github.com wrote:
As much as I love the language I hate the way Swift does pointers and it seems like every release they change it. On Xcode 8.1 where you are getting the errors change withUnsafePointer to withUnsafeMutablePointer.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub #1 (comment), or mute the thread https://github.com/notifications/unsubscribe-auth/AAlNgdrnsT9rgReplC7CGgUvOJdKU_qCks5q6igggaJpZM4Koq6v.
I just checked in the fix, there were a total of 6 of them to change
magic yes I fixed three but I’ll grab it now many thanks
On Nov 3, 2016, at 11:49 AM, Christopher Worley notifications@github.com wrote:
I just checked in the fix, there were a total of 6 of them to change
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub #1 (comment), or mute the thread https://github.com/notifications/unsubscribe-auth/AAlNgVNrAlNLzjmrRxIdVIXZuDMEtvSFks5q6iymgaJpZM4Koq6v.
Thanks for letting me know.
Works great and the bounding box is back. Many thanks will study.
On Nov 3, 2016, at 11:51 AM, Christopher Worley notifications@github.com wrote:
Thanks for letting me know.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub #1 (comment), or mute the thread https://github.com/notifications/unsubscribe-auth/AAlNgQnxr5-DI07bQYpLhqdpzQJZH1KAks5q6i0bgaJpZM4Koq6v.