MCPcopy Create free account
hub / github.com/TombEngine/TombEngine / FieldIndexToOffset

Function FieldIndexToOffset

Libs/flatbuffers/flatbuffers.h:1188–1192  ·  view source on GitHub ↗

Converts a Field ID to a virtual table offset.

Source from the content-addressed store, hash-verified

1186
1187// Converts a Field ID to a virtual table offset.
1188inline voffset_t FieldIndexToOffset(voffset_t field_id) {
1189 // Should correspond to what EndTable() below builds up.
1190 const int fixed_fields = 2; // Vtable size and Object Size.
1191 return static_cast<voffset_t>((field_id + fixed_fields) * sizeof(voffset_t));
1192}
1193
1194template<typename T, typename Alloc>
1195const T *data(const std::vector<T, Alloc> &v) {

Callers 2

IterateObjectFunction · 0.85
EndTableFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected