mirror of
https://github.com/google/flatbuffers.git
synced 2026-06-03 12:21:23 +00:00
Added additional convenience overloads to CreateVector().
Bug: 29337887, 29336299 Change-Id: Iad8b3b2263f6cea7ee7e45994369194960df293b Tested: on Linux.
This commit is contained in:
@@ -790,6 +790,14 @@ offsets.
|
||||
~~~
|
||||
</div>
|
||||
|
||||
<div class="language-cpp">
|
||||
<br>
|
||||
Note there's additional convenience overloads of `CreateVector`, allowing you
|
||||
to work with data that's not in a `std::vector`, or allowing you to generate
|
||||
elements by calling a lambda. For the common case of `std::vector<std::string>`
|
||||
there's also `CreateVectorOfStrings`.
|
||||
</div>
|
||||
|
||||
To create a `struct`, use the `Vec3` class/struct that was generated by
|
||||
the schema compiler:
|
||||
|
||||
@@ -1075,7 +1083,7 @@ Here is a repetition these lines, to help highlight them more clearly:
|
||||
<div class="language-c">
|
||||
~~~{.c}
|
||||
// Add union type and data simultanously.
|
||||
ns(Monster_equipped_Weapon_add(B, axe));
|
||||
ns(Monster_equipped_Weapon_add(B, axe));
|
||||
~~~
|
||||
</div>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user