mirror of
https://github.com/google/flatbuffers.git
synced 2026-06-16 01:07:29 +00:00
Use CreateVectorOfStructs when creating a vector of structs.
(mirrored from cl/180944741) Change-Id: Ib9f1613ccc355528c5c495fd953a9b3944ecb4ce
This commit is contained in:
@@ -1166,7 +1166,7 @@ inline flatbuffers::Offset<Monster> CreateMonsterDirect(
|
||||
Color color = Color_Blue,
|
||||
Any test_type = Any_NONE,
|
||||
flatbuffers::Offset<void> test = 0,
|
||||
const std::vector<const Test *> *test4 = nullptr,
|
||||
const std::vector<Test> *test4 = nullptr,
|
||||
const std::vector<flatbuffers::Offset<flatbuffers::String>> *testarrayofstring = nullptr,
|
||||
const std::vector<flatbuffers::Offset<Monster>> *testarrayoftables = nullptr,
|
||||
flatbuffers::Offset<Monster> enemy = 0,
|
||||
@@ -1186,9 +1186,9 @@ inline flatbuffers::Offset<Monster> CreateMonsterDirect(
|
||||
float testf2 = 3.0f,
|
||||
float testf3 = 0.0f,
|
||||
const std::vector<flatbuffers::Offset<flatbuffers::String>> *testarrayofstring2 = nullptr,
|
||||
const std::vector<const Ability *> *testarrayofsortedstruct = nullptr,
|
||||
const std::vector<Ability> *testarrayofsortedstruct = nullptr,
|
||||
const std::vector<uint8_t> *flex = nullptr,
|
||||
const std::vector<const Test *> *test5 = nullptr,
|
||||
const std::vector<Test> *test5 = nullptr,
|
||||
const std::vector<int64_t> *vector_of_longs = nullptr,
|
||||
const std::vector<double> *vector_of_doubles = nullptr,
|
||||
flatbuffers::Offset<MyGame::InParentNamespace> parent_namespace_test = 0) {
|
||||
@@ -1202,7 +1202,7 @@ inline flatbuffers::Offset<Monster> CreateMonsterDirect(
|
||||
color,
|
||||
test_type,
|
||||
test,
|
||||
test4 ? _fbb.CreateVector<const Test *>(*test4) : 0,
|
||||
test4 ? _fbb.CreateVectorOfStructs<Test>(*test4) : 0,
|
||||
testarrayofstring ? _fbb.CreateVector<flatbuffers::Offset<flatbuffers::String>>(*testarrayofstring) : 0,
|
||||
testarrayoftables ? _fbb.CreateVector<flatbuffers::Offset<Monster>>(*testarrayoftables) : 0,
|
||||
enemy,
|
||||
@@ -1222,9 +1222,9 @@ inline flatbuffers::Offset<Monster> CreateMonsterDirect(
|
||||
testf2,
|
||||
testf3,
|
||||
testarrayofstring2 ? _fbb.CreateVector<flatbuffers::Offset<flatbuffers::String>>(*testarrayofstring2) : 0,
|
||||
testarrayofsortedstruct ? _fbb.CreateVector<const Ability *>(*testarrayofsortedstruct) : 0,
|
||||
testarrayofsortedstruct ? _fbb.CreateVectorOfStructs<Ability>(*testarrayofsortedstruct) : 0,
|
||||
flex ? _fbb.CreateVector<uint8_t>(*flex) : 0,
|
||||
test5 ? _fbb.CreateVector<const Test *>(*test5) : 0,
|
||||
test5 ? _fbb.CreateVectorOfStructs<Test>(*test5) : 0,
|
||||
vector_of_longs ? _fbb.CreateVector<int64_t>(*vector_of_longs) : 0,
|
||||
vector_of_doubles ? _fbb.CreateVector<double>(*vector_of_doubles) : 0,
|
||||
parent_namespace_test);
|
||||
|
||||
Reference in New Issue
Block a user