Commit da88be05 authored by Jason Monschke's avatar Jason Monschke Committed by Wouter van Oortmerssen

Change deprecated vector Length() to size() in tutorial (#5450)

parent d4fa984f
......@@ -2555,7 +2555,7 @@ FlatBuffers `vector`.
<div class="language-cpp">
~~~{.cpp}
auto inv = monster->inventory(); // A pointer to a `flatbuffers::Vector<>`.
auto inv_len = inv->Length();
auto inv_len = inv->size();
auto third_item = inv->Get(2);
~~~
</div>
......@@ -2650,7 +2650,7 @@ except your need to handle the result as a FlatBuffer `table`:
<div class="language-cpp">
~~~{.cpp}
auto weapons = monster->weapons(); // A pointer to a `flatbuffers::Vector<>`.
auto weapon_len = weapons->Length();
auto weapon_len = weapons->size();
auto second_weapon_name = weapons->Get(1)->name()->str();
auto second_weapon_damage = weapons->Get(1)->damage()
~~~
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment