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

Function GetRoot

native/thirdpart/flatbuffers/flexbuffers.h:864–872  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

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

Callers 1

CompileMethod · 0.70

Calls 3

ReferenceClass · 0.85
vector_dataFunction · 0.85
sizeMethod · 0.45

Tested by

no test coverage detected