Updates swift generated monster sample file (#6616)

Updates swift generated monster sample file
Adds frozen attribute
This commit is contained in:
mustiikhalil
2021-05-06 07:55:03 +03:00
committed by GitHub
parent a4bb8f0c2e
commit 8a582883ac
5 changed files with 28 additions and 22 deletions

View File

@@ -16,6 +16,7 @@
import Foundation
@frozen
public struct FlatBufferBuilder {
/// Storage for the Vtables used in the buffer are stored in here, so they would be written later in EndTable
@@ -532,6 +533,7 @@ extension FlatBufferBuilder: CustomDebugStringConvertible {
var addedElements: Int { capacity - (numOfFields &* size) }
/// Creates the memory to store the buffer in
@usableFromInline
init() {
memory = UnsafeMutableRawBufferPointer.allocate(byteCount: 0, alignment: 0)
}