Added Copyright headers

Change-Id: I106de8985cea572590d49c896b72c54f33e73bd2
This commit is contained in:
loverszhaokai
2015-02-28 18:06:53 +08:00
committed by Wouter van Oortmerssen
parent 6ccdfff0af
commit 432f3f26a4
8 changed files with 112 additions and 16 deletions

View File

@@ -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;