Fix compiler errors after update to Swift 4.2
This commit is contained in:
parent
9f5b7c7cb5
commit
5caa763a99
3 changed files with 25 additions and 20 deletions
|
|
@ -11,7 +11,7 @@ import Foundation
|
|||
extension UnsafeMutableRawPointer {
|
||||
func writeAndAdvance<T>(value: inout T) -> UnsafeMutableRawPointer {
|
||||
let stride = MemoryLayout.stride(ofValue: value)
|
||||
copyBytes(from: &value, count: stride)
|
||||
copyMemory(from: &value, byteCount: stride)
|
||||
return advanced(by: stride)
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue