Add static asserts to ensure that reflection API arrays are kept in sync (#5934)

* Add static asserts to ensure that reflection API arrays are kept in sync

* Move changes from generated file into source fbs file

* Rename enum value and regenerate reflection_generated.h

* Add comments to each entries of type sizes array
This commit is contained in:
Laurentiu Cristofor
2020-06-02 09:50:56 -07:00
committed by GitHub
parent 988164f6e1
commit d026e6f071
3 changed files with 37 additions and 8 deletions

View File

@@ -24,12 +24,15 @@ enum BaseType : byte {
Vector,
Obj, // Used for tables & structs.
Union,
Array
Array,
// Add any new type above this value.
MaxBaseType
}
table Type {
base_type:BaseType;
element:BaseType = None; // Only if base_type == Vector
element:BaseType = None; // Only if base_type == Vector
// or base_type == Array.
index:int = -1; // If base_type == Object, index into "objects" below.
// If base_type == Union, UnionType, or integral derived