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

Function GetAnyVectorElemPointer

Libs/flatbuffers/reflection.h:254–257  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

252// Warning: does no typechecking.
253template<typename T>
254T *GetAnyVectorElemPointer(const VectorOfAny *vec, size_t i) {
255 auto elem_ptr = vec->Data() + sizeof(uoffset_t) * i;
256 return reinterpret_cast<T *>(elem_ptr + ReadScalar<uoffset_t>(elem_ptr));
257}
258
259// Get the inline-address of a vector element. Useful for Structs (pass Struct
260// as template arg), or being able to address a range of scalars in-line.

Callers

nothing calls this directly

Calls 1

DataMethod · 0.45

Tested by

no test coverage detected