mirror of
https://github.com/google/flatbuffers.git
synced 2026-06-20 02:55:06 +00:00
bulk code format fix (#8707)
This commit is contained in:
@@ -3,7 +3,7 @@ import Foundation
|
||||
|
||||
func run() {
|
||||
// create a ByteBuffer(:) from an [UInt8] or Data()
|
||||
let buf = [] // Get your data
|
||||
let buf = [] // Get your data
|
||||
var byteBuffer = ByteBuffer(bytes: buf)
|
||||
// Get an accessor to the root object inside the buffer.
|
||||
let monster: Monster = try! getCheckedRoot(byteBuffer: &byteBuffer)
|
||||
|
||||
@@ -3,7 +3,7 @@ import Foundation
|
||||
|
||||
func run() {
|
||||
// create a ByteBuffer(:) from an [UInt8] or Data()
|
||||
let buf = [] // Get your data
|
||||
let buf = [] // Get your data
|
||||
var byteBuffer = ByteBuffer(bytes: buf)
|
||||
// Get an accessor to the root object inside the buffer.
|
||||
let monster: Monster = try! getCheckedRoot(byteBuffer: &byteBuffer)
|
||||
@@ -11,7 +11,7 @@ func run() {
|
||||
|
||||
let hp = monster.hp
|
||||
let mana = monster.mana
|
||||
let name = monster.name // returns an optional string
|
||||
let name = monster.name // returns an optional string
|
||||
|
||||
let pos = monster.pos
|
||||
let x = pos.x
|
||||
|
||||
@@ -3,7 +3,7 @@ import Foundation
|
||||
|
||||
func run() {
|
||||
// create a ByteBuffer(:) from an [UInt8] or Data()
|
||||
let buf = [] // Get your data
|
||||
let buf = [] // Get your data
|
||||
var byteBuffer = ByteBuffer(bytes: buf)
|
||||
// Get an accessor to the root object inside the buffer.
|
||||
let monster: Monster = try! getCheckedRoot(byteBuffer: &byteBuffer)
|
||||
@@ -11,7 +11,7 @@ func run() {
|
||||
|
||||
let hp = monster.hp
|
||||
let mana = monster.mana
|
||||
let name = monster.name // returns an optional string
|
||||
let name = monster.name // returns an optional string
|
||||
|
||||
let pos = monster.pos
|
||||
let x = pos.x
|
||||
@@ -20,7 +20,7 @@ func run() {
|
||||
// Get and check if the monster has an equipped item
|
||||
if monster.equippedType == .weapon {
|
||||
let _weapon = monster.equipped(type: Weapon.self)
|
||||
let name = _weapon.name // should return "Axe"
|
||||
let dmg = _weapon.damage // should return 5
|
||||
let name = _weapon.name // should return "Axe"
|
||||
let dmg = _weapon.damage // should return 5
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user