Converts a Field ID to a virtual table offset.
| 1111 | |
| 1112 | // Converts a Field ID to a virtual table offset. |
| 1113 | inline 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 | |
| 1119 | template<typename T, typename Alloc> |
| 1120 | const T *data(const std::vector<T, Alloc> &v) { |
no outgoing calls
no test coverage detected