mirror of
https://github.com/google/flatbuffers.git
synced 2026-07-06 08:26:55 +00:00
[Swift] Implements FlatbuffersVector which confirms to RandomAccessCollection (#8752)
* Implements FlatbuffersVector in swift Implements FlatbuffersVector which confirms to RandomAccessCollection, this would give us semi-native sugary syntax to all the arrays in swift port. This work will also be the foundation of using arrays in swift * Fix failing tests for Swift
This commit is contained in:
@@ -192,8 +192,8 @@ class Country {
|
||||
builder: inout FlatBufferBuilder,
|
||||
name: String,
|
||||
log: Int32,
|
||||
lan: Int32
|
||||
) -> Offset {
|
||||
lan: Int32) -> Offset
|
||||
{
|
||||
createCountry(
|
||||
builder: &builder,
|
||||
offset: builder.create(string: name),
|
||||
@@ -206,8 +206,8 @@ class Country {
|
||||
builder: inout FlatBufferBuilder,
|
||||
offset: Offset,
|
||||
log: Int32,
|
||||
lan: Int32
|
||||
) -> Offset {
|
||||
lan: Int32) -> Offset
|
||||
{
|
||||
let _start = builder.startTable(with: 3)
|
||||
Country.add(builder: &builder, lng: log)
|
||||
Country.add(builder: &builder, lan: lan)
|
||||
@@ -218,8 +218,8 @@ class Country {
|
||||
@inlinable
|
||||
static func end(
|
||||
builder: inout FlatBufferBuilder,
|
||||
startOffset: UOffset
|
||||
) -> Offset {
|
||||
startOffset: UOffset) -> Offset
|
||||
{
|
||||
Offset(offset: builder.endTable(at: startOffset))
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user