Fix compiler errors after update to Swift 4.2

This commit is contained in:
Eryn Wells 2018-10-05 13:45:37 -07:00
parent 9f5b7c7cb5
commit 5caa763a99
3 changed files with 25 additions and 20 deletions

View file

@ -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)
}
}