mirror of
https://github.com/google/flatbuffers.git
synced 2026-06-15 16:57:29 +00:00
Fixed bug in convenient constructors for Java/C#
Also fixed Go unit tests not being up to date with recent schema changes. Change-Id: I42e619f9c5ea05f6f937c68a5c8a92462c46bce3 Tested: on Linux and Windows.
This commit is contained in:
@@ -463,7 +463,7 @@ static void GenStruct(const LanguageParameters &lang, const Parser &parser,
|
||||
if (has_no_struct_fields && num_fields) {
|
||||
// Generate a table constructor of the form:
|
||||
// public static void createName(FlatBufferBuilder builder, args...)
|
||||
code += " public static void " + FunctionStart(lang, 'C') + "reate";
|
||||
code += " public static int " + FunctionStart(lang, 'C') + "reate";
|
||||
code += struct_def.name;
|
||||
code += "(FlatBufferBuilder builder";
|
||||
for (auto it = struct_def.fields.vec.begin();
|
||||
@@ -495,8 +495,9 @@ static void GenStruct(const LanguageParameters &lang, const Parser &parser,
|
||||
}
|
||||
}
|
||||
}
|
||||
code += " builder.";
|
||||
code += FunctionStart(lang, 'E') + "ndObject();\n }\n\n";
|
||||
code += " return " + struct_def.name + ".";
|
||||
code += FunctionStart(lang, 'E') + "nd" + struct_def.name;
|
||||
code += "(builder);\n }\n\n";
|
||||
}
|
||||
// Generate a set of static methods that allow table construction,
|
||||
// of the form:
|
||||
|
||||
Reference in New Issue
Block a user