mirror of
https://github.com/google/flatbuffers.git
synced 2026-06-03 12:21:23 +00:00
Added "Direct" suffix to vector/string object creation functions.
They were overloaded, but also had default arguments, so would become ambiguous when used with few arguments. Change-Id: Ifac7f3ea3a6391d971dfeda8e33129c8c38d6f12 Tested: on Linux.
This commit is contained in:
@@ -897,11 +897,11 @@ class CppGenerator : public BaseGenerator {
|
||||
}
|
||||
code += " return builder_.Finish();\n}\n\n";
|
||||
|
||||
// Generate a CreateX function with vector types as parameters
|
||||
// Generate a CreateXDirect function with vector types as parameters
|
||||
if (gen_vector_pars) {
|
||||
code += "inline flatbuffers::Offset<" + struct_def.name + "> Create";
|
||||
code += struct_def.name;
|
||||
code += "(flatbuffers::FlatBufferBuilder &_fbb";
|
||||
code += "Direct(flatbuffers::FlatBufferBuilder &_fbb";
|
||||
for (auto it = struct_def.fields.vec.begin();
|
||||
it != struct_def.fields.vec.end(); ++it) {
|
||||
auto &field = **it;
|
||||
|
||||
Reference in New Issue
Block a user