Struct typetable (#5291)

* C++: Generate MiniReflectTypeTable for Structs as well as Tables

* Update generated code

* add test
This commit is contained in:
Nils Berg
2019-04-15 20:38:00 +02:00
committed by Wouter van Oortmerssen
parent 98b9b5a933
commit cef8f928bb
6 changed files with 41 additions and 0 deletions

View File

@@ -174,6 +174,9 @@ FLATBUFFERS_MANUALLY_ALIGNED_STRUCT(4) Vec3 FLATBUFFERS_FINAL_CLASS {
float z_;
public:
static const flatbuffers::TypeTable *MiniReflectTypeTable() {
return Vec3TypeTable();
}
Vec3() {
memset(static_cast<void *>(this), 0, sizeof(Vec3));
}