mirror of
https://github.com/google/flatbuffers.git
synced 2026-11-13 07:26:23 +00:00
Bigfoot
This commit is contained in:
@@ -31,7 +31,7 @@ struct _InternalByteBuffer {
|
||||
@usableFromInline
|
||||
final class Storage {
|
||||
/// pointer to the start of the buffer object in memory
|
||||
@exclusivity(unchecked) private(set) var memory: UnsafeMutableRawPointer
|
||||
var memory: UnsafeMutableRawPointer
|
||||
|
||||
@usableFromInline
|
||||
init(count: Int, alignment: Int) {
|
||||
@@ -60,7 +60,7 @@ struct _InternalByteBuffer {
|
||||
let newData = UnsafeMutableRawPointer.allocate(
|
||||
byteCount: capacity,
|
||||
alignment: alignment)
|
||||
memset(newData, 0, capacity)
|
||||
memset(newData, 0, capacity &- writerSize)
|
||||
memcpy(
|
||||
newData,
|
||||
memory,
|
||||
|
||||
Reference in New Issue
Block a user