0

I'm migrating my code from swift 2 to swift 3 and i'm having this error for these lines

let codeBuffer = UnsafePointer<UInt16>((buffer+offset))

let bytes = UnsafePointer<UInt64>((buffer+offset))

how can i fix it using withMemoryRebound method ??

user3573587
  • 21
  • 1
  • 3
  • What type has `buffer`? Did you check the "Related" questions with the same title? – Martin R Jun 19 '17 at 11:04
  • `let buffer = UnsafeMutableRawPointer(frame!.mutableBytes).assumingMemoryBound(to: UInt8.self)` when 'let codeBuffer = UnsafeMutablePointer((buffer+offset))` yes I have checked couldn't get any answer – user3573587 Jun 19 '17 at 11:17
  • If you have a Unsafe(Mutable)RawPointer then this might help: https://stackoverflow.com/questions/38983277/how-to-get-bytes-out-of-an-unsafemutablerawpointer. – Martin R Jun 19 '17 at 11:19

0 Answers0