| 694 | } |
| 695 | |
| 696 | template<typename T> void AddStruct(voffset_t field, const T *structptr) { |
| 697 | if (!structptr) return; // Default, don't store. |
| 698 | Align(AlignOf<T>()); |
| 699 | PushBytes(reinterpret_cast<const uint8_t *>(structptr), sizeof(T)); |
| 700 | TrackField(field, GetSize()); |
| 701 | } |
| 702 | |
| 703 | void AddStructOffset(voffset_t field, uoffset_t off) { |
| 704 | TrackField(field, off); |
nothing calls this directly
no test coverage detected