Offsets initially are relative to the end of the buffer (downwards). This function converts them to be relative to the current location in the buffer (when stored here), pointing upwards.
| 708 | // This function converts them to be relative to the current location |
| 709 | // in the buffer (when stored here), pointing upwards. |
| 710 | uoffset_t ReferTo(uoffset_t off) { |
| 711 | // Align to ensure GetSize() below is correct. |
| 712 | Align(sizeof(uoffset_t)); |
| 713 | // Offset must refer to something already in buffer. |
| 714 | assert(off && off <= GetSize()); |
| 715 | return GetSize() - off + sizeof(uoffset_t); |
| 716 | } |
| 717 | |
| 718 | void NotNested() { |
| 719 | // If you hit this, you're trying to construct a Table/Vector/String |
no test coverage detected