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

This commit is contained in:
Jason Monschke 2019-07-25 18:09:40 +00:00 committed by Wouter van Oortmerssen
parent d4fa984f1d
commit da88be05e1
1 changed files with 2 additions and 2 deletions

View File

@ -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()
~~~