MCPcopy Create free account
hub / github.com/HumbleNet/HumbleNet / ReferTo

Function ReferTo

3rdparty/flatbuffers/include/flatbuffers/flatbuffers.h:710–716  ·  view source on GitHub ↗

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.

Source from the content-addressed store, hash-verified

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

Callers 3

PushElementFunction · 0.85
AddOffsetFunction · 0.85
FinishFunction · 0.85

Calls 2

AlignFunction · 0.85
GetSizeFunction · 0.85

Tested by

no test coverage detected