MCPcopy Create free account
hub / github.com/bytedance/Fastbot_Android / ReferTo

Function ReferTo

native/thirdpart/flatbuffers/flatbuffers.h:1411–1417  ·  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

1409 // This function converts them to be relative to the current location
1410 // in the buffer (when stored here), pointing upwards.
1411 uoffset_t ReferTo(uoffset_t off) {
1412 // Align to ensure GetSize() below is correct.
1413 Align(sizeof(uoffset_t));
1414 // Offset must refer to something already in buffer.
1415 FLATBUFFERS_ASSERT(off && off <= GetSize());
1416 return GetSize() - off + static_cast<uoffset_t>(sizeof(uoffset_t));
1417 }
1418
1419 void NotNested() {
1420 // 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.70
GetSizeFunction · 0.70

Tested by

no test coverage detected