mirror of
https://github.com/google/flatbuffers.git
synced 2026-07-05 19:06:53 +00:00
[swift] Moves code to use VTablesStorage (#5888)
* Moves the code to use _vtablestorage Rebuilt the test to confirm to the new API Adds documentation + generates code for grpc Reverts indentation v0.4.0 Updated swift/readme.md Updates VtableStorage to ensure space instead of reallocating each time Fixes str count not being correct * Fixes issue with boolean constant not being set + removes unused function
This commit is contained in:
@@ -32,7 +32,7 @@ final class FlatBuffersVectors: XCTestCase {
|
||||
b.finish(offset: o)
|
||||
XCTAssertEqual(b.sizedByteArray, [4, 0, 0, 0, 0, 0, 0, 0])
|
||||
}
|
||||
|
||||
|
||||
func testCreateVectorOfStrings() {
|
||||
let strs = ["Denmark", "Norway"]
|
||||
var b = FlatBufferBuilder(initialSize: 20)
|
||||
@@ -110,7 +110,7 @@ struct Numbers {
|
||||
|
||||
static func createNumbers(b: inout FlatBufferBuilder, o: Offset<UOffset>) -> Offset<UOffset> {
|
||||
let start = b.startTable(with: 1)
|
||||
b.add(offset: o, at: 0)
|
||||
b.add(offset: o, at: 4)
|
||||
return Offset(offset: b.endTable(at: start))
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user