MCPcopy Create free account
hub / github.com/bytedance/Fastbot_Android / FieldIndexToOffset

Function FieldIndexToOffset

native/thirdpart/flatbuffers/flatbuffers.h:1113–1117  ·  view source on GitHub ↗

Converts a Field ID to a virtual table offset.

Source from the content-addressed store, hash-verified

1111
1112// Converts a Field ID to a virtual table offset.
1113inline voffset_t FieldIndexToOffset(voffset_t field_id) {
1114 // Should correspond to what EndTable() below builds up.
1115 const int fixed_fields = 2; // Vtable size and Object Size.
1116 return static_cast<voffset_t>((field_id + fixed_fields) * sizeof(voffset_t));
1117}
1118
1119template<typename T, typename Alloc>
1120const T *data(const std::vector<T, Alloc> &v) {

Callers 4

AddFieldMethod · 0.85
ParseDeclMethod · 0.85
IterateObjectFunction · 0.85
EndTableFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected