diff options
author | mustiikhalil <mustii@mmk.one> | 2021-02-19 23:16:38 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-02-19 12:16:38 -0800 |
commit | e2f5438ac1847c322dc558628ea4f83c8498a071 (patch) | |
tree | ede6eb54d5a29f2d3c1be84860dba394e899b48d /samples | |
parent | 5e3613f73294f3b03b5373c05ea9f7402d58131e (diff) | |
download | flatbuffers-e2f5438ac1847c322dc558628ea4f83c8498a071.tar.gz flatbuffers-e2f5438ac1847c322dc558628ea4f83c8498a071.tar.bz2 flatbuffers-e2f5438ac1847c322dc558628ea4f83c8498a071.zip |
Fixes grammer (#6477)
Updates docs
Diffstat (limited to 'samples')
-rw-r--r-- | samples/monster_generated.swift | 12 | ||||
-rw-r--r-- | samples/sample_binary.swift | 10 |
2 files changed, 11 insertions, 11 deletions
diff --git a/samples/monster_generated.swift b/samples/monster_generated.swift index 4400c5af..93f95871 100644 --- a/samples/monster_generated.swift +++ b/samples/monster_generated.swift @@ -137,13 +137,13 @@ public struct MyGame_Sample_Monster: FlatBufferObject { pos: MyGame_Sample_Vec3? = nil, mana: Int16 = 150, hp: Int16 = 100, - offsetOfName name: Offset<String> = Offset(), - vectorOfInventory inventory: Offset<UOffset> = Offset(), + nameOffset name: Offset<String> = Offset(), + inventoryVectorOffset inventory: Offset<UOffset> = Offset(), color: MyGame_Sample_Color = .blue, - vectorOfWeapons weapons: Offset<UOffset> = Offset(), + weaponsVectorOffset weapons: Offset<UOffset> = Offset(), equippedType: MyGame_Sample_Equipment = .none_, - offsetOfEquipped equipped: Offset<UOffset> = Offset(), - vectorOfPath path: Offset<UOffset> = Offset() + equippedOffset equipped: Offset<UOffset> = Offset(), + pathVectorOffset path: Offset<UOffset> = Offset() ) -> Offset<UOffset> { let __start = MyGame_Sample_Monster.startMonster(&fbb) MyGame_Sample_Monster.add(pos: pos, &fbb) @@ -188,7 +188,7 @@ public struct MyGame_Sample_Weapon: FlatBufferObject { public static func endWeapon(_ fbb: inout FlatBufferBuilder, start: UOffset) -> Offset<UOffset> { let end = Offset<UOffset>(offset: fbb.endTable(at: start)); return end } public static func createWeapon( _ fbb: inout FlatBufferBuilder, - offsetOfName name: Offset<String> = Offset(), + nameOffset name: Offset<String> = Offset(), damage: Int16 = 0 ) -> Offset<UOffset> { let __start = MyGame_Sample_Weapon.startWeapon(&fbb) diff --git a/samples/sample_binary.swift b/samples/sample_binary.swift index bd9b5c0d..889bc980 100644 --- a/samples/sample_binary.swift +++ b/samples/sample_binary.swift @@ -46,14 +46,14 @@ func main() { let orc = Monster.createMonster( &builder, - structOfPos: MyGame_Sample_Vec3(x: 1, y: 2, z: 3), + pos: MyGame_Sample_Vec3(x: 1, y: 2, z: 3), hp: 300, - offsetOfName: name, - vectorOfInventory: inventoryOffset, + nameOffset: name, + inventoryVectorOffset: inventoryOffset, color: .red, - vectorOfWeapons: weaponsOffset, + weaponsVectorOffset: weaponsOffset, equippedType: .weapon, - offsetOfEquipped: axe) + equippedOffset: axe) builder.finish(offset: orc) let buf = builder.sizedByteArray |