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