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

Function ReferTo

Libs/flatbuffers/flatbuffers.h:1485–1491  ·  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

1483 // This function converts them to be relative to the current location
1484 // in the buffer (when stored here), pointing upwards.
1485 uoffset_t ReferTo(uoffset_t off) {
1486 // Align to ensure GetSize() below is correct.
1487 Align(sizeof(uoffset_t));
1488 // Offset must refer to something already in buffer.
1489 FLATBUFFERS_ASSERT(off && off <= GetSize());
1490 return GetSize() - off + static_cast<uoffset_t>(sizeof(uoffset_t));
1491 }
1492
1493 void NotNested() {
1494 // 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