mirror of
https://github.com/google/flatbuffers.git
synced 2026-06-06 21:37:36 +00:00
Removes Dead code & regenerate code (#7744)
Formats the swift project Update Sample files Update docc documentation Updates swift docs in the website Updates code for Wasm
This commit is contained in:
@@ -2472,10 +2472,10 @@ myGame.Monster monster = new myGame.Monster(data);
|
||||
<div class="language-swift">
|
||||
~~~{.swift}
|
||||
// create a ByteBuffer(:) from an [UInt8] or Data()
|
||||
let buf = // Get your data
|
||||
|
||||
var buf = // Get your data
|
||||
// Get an accessor to the root object inside the buffer.
|
||||
let monster = Monster.getRootAsMonster(bb: ByteBuffer(bytes: buf))
|
||||
let monster: Monster = try! getCheckedRoot(byteBuffer: &byteBuffer)
|
||||
// let monster: Monster = getRoot(byteBuffer: &byteBuffer)
|
||||
~~~
|
||||
</div>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user