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

Function GetRoot

Libs/flatbuffers/flexbuffers.h:865–873  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

863}
864
865inline Reference GetRoot(const uint8_t *buffer, size_t size) {
866 // See Finish() below for the serialization counterpart of this.
867 // The root starts at the end of the buffer, so we parse backwards from there.
868 auto end = buffer + size;
869 auto byte_width = *--end;
870 auto packed_type = *--end;
871 end -= byte_width; // The root data item.
872 return Reference(end, byte_width, packed_type);
873}
874
875inline Reference GetRoot(const std::vector<uint8_t> &buffer) {
876 return GetRoot(flatbuffers::vector_data(buffer), buffer.size());

Callers

nothing calls this directly

Calls 3

ReferenceClass · 0.85
vector_dataFunction · 0.85
sizeMethod · 0.45

Tested by

no test coverage detected