mirror of
https://github.com/google/flatbuffers.git
synced 2026-06-05 21:17:25 +00:00
Added Copyright headers
Change-Id: I106de8985cea572590d49c896b72c54f33e73bd2
This commit is contained in:
committed by
Wouter van Oortmerssen
parent
6ccdfff0af
commit
432f3f26a4
@@ -324,11 +324,11 @@ static void GenStruct(const LanguageParameters &lang, const Parser &parser,
|
||||
// of a FlatBuffer
|
||||
std::string method_name = FunctionStart(lang, 'G') + "etRootAs" + struct_def.name;
|
||||
std::string method_signature = " public static " + struct_def.name + " " + method_name;
|
||||
|
||||
|
||||
// create convenience method that doesn't require an existing object
|
||||
code += method_signature + "(ByteBuffer _bb) ";
|
||||
code += "{ return " + method_name + "(_bb, new " + struct_def.name+ "()); }\n";
|
||||
|
||||
|
||||
// create method that allows object reuse
|
||||
code += method_signature + "(ByteBuffer _bb, " + struct_def.name + " obj) { ";
|
||||
code += lang.set_bb_byteorder;
|
||||
|
||||
Reference in New Issue
Block a user