Fixed more Windows build errors.

Change-Id: I556e1c103e8501dc144b16c8698463253de6f4fb
parent 13194ece
......@@ -56,7 +56,7 @@ template<> struct EquipmentTraits<Weapon> {
struct EquipmentUnion {
Equipment type;
flatbuffers::NativeTable *table = nullptr;
flatbuffers::NativeTable *table;
EquipmentUnion() : type(Equipment_NONE), table(nullptr) {}
EquipmentUnion(const EquipmentUnion &);
EquipmentUnion &operator=(const EquipmentUnion &);
......
......@@ -526,7 +526,7 @@ class CppGenerator : public BaseGenerator {
// Generate a union type
code += "struct " + enum_def.name + "Union {\n";
code += " " + enum_def.name + " type;\n\n";
code += " flatbuffers::NativeTable *table = nullptr;\n";
code += " flatbuffers::NativeTable *table;\n";
code += " " + enum_def.name + "Union() : type(";
code += GetEnumValUse(enum_def, *enum_def.vals.Lookup("NONE"), parser_.opts);
code += "), table(nullptr) {}\n";
......
No preview for this file type
......@@ -78,7 +78,7 @@ template<> struct AnyTraits<MyGame::Example2::Monster> {
struct AnyUnion {
Any type;
flatbuffers::NativeTable *table = nullptr;
flatbuffers::NativeTable *table;
AnyUnion() : type(Any_NONE), table(nullptr) {}
AnyUnion(const AnyUnion &);
AnyUnion &operator=(const AnyUnion &);
......
......@@ -15,6 +15,10 @@ func (rcv *StructInNestedNS) Init(buf []byte, i flatbuffers.UOffsetT) {
rcv._tab.Pos = i
}
func (rcv *StructInNestedNS) Table() flatbuffers.Table {
return rcv._tab.Table
}
func (rcv *StructInNestedNS) A() int32 {
return rcv._tab.GetInt32(rcv._tab.Pos + flatbuffers.UOffsetT(0))
}
......
......@@ -22,6 +22,10 @@ func (rcv *TableInNestedNS) Init(buf []byte, i flatbuffers.UOffsetT) {
rcv._tab.Pos = i
}
func (rcv *TableInNestedNS) Table() flatbuffers.Table {
return rcv._tab
}
func (rcv *TableInNestedNS) Foo() int32 {
o := flatbuffers.UOffsetT(rcv._tab.Offset(4))
if o != 0 {
......
......@@ -22,6 +22,10 @@ func (rcv *SecondTableInA) Init(buf []byte, i flatbuffers.UOffsetT) {
rcv._tab.Pos = i
}
func (rcv *SecondTableInA) Table() flatbuffers.Table {
return rcv._tab
}
func (rcv *SecondTableInA) ReferToC(obj *TableInC) *TableInC {
o := flatbuffers.UOffsetT(rcv._tab.Offset(4))
if o != 0 {
......
......@@ -22,6 +22,10 @@ func (rcv *TableInFirstNS) Init(buf []byte, i flatbuffers.UOffsetT) {
rcv._tab.Pos = i
}
func (rcv *TableInFirstNS) Table() flatbuffers.Table {
return rcv._tab
}
func (rcv *TableInFirstNS) FooTable(obj *TableInNestedNS) *TableInNestedNS {
o := flatbuffers.UOffsetT(rcv._tab.Offset(4))
if o != 0 {
......
......@@ -22,6 +22,10 @@ func (rcv *TableInC) Init(buf []byte, i flatbuffers.UOffsetT) {
rcv._tab.Pos = i
}
func (rcv *TableInC) Table() flatbuffers.Table {
return rcv._tab
}
func (rcv *TableInC) ReferToA1(obj *TableInFirstNS) *TableInFirstNS {
o := flatbuffers.UOffsetT(rcv._tab.Offset(4))
if o != 0 {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment