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

Function CreateVectorOfStructs

Libs/flatbuffers/flatbuffers.h:1921–1927  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1919 /// where the vector is stored.
1920 template<typename T>
1921 Offset<Vector<const T *>> CreateVectorOfStructs(const T *v, size_t len) {
1922 StartVector(len * sizeof(T) / AlignOf<T>(), AlignOf<T>());
1923 if (len > 0) {
1924 PushBytes(reinterpret_cast<const uint8_t *>(v), sizeof(T) * len);
1925 }
1926 return Offset<Vector<const T *>>(EndVector(len));
1927 }
1928
1929 /// @brief Serialize an array of native structs into a FlatBuffer `vector`.
1930 /// @tparam T The data type of the struct array elements.

Callers 1

Calls 5

PushBytesFunction · 0.85
StartVectorFunction · 0.70
EndVectorFunction · 0.70
dataFunction · 0.70
sizeMethod · 0.45

Tested by

no test coverage detected