| 945 | /// @return Returns a typed `Offset` into the serialized data indicating |
| 946 | /// where the vector is stored. |
| 947 | template<typename T> Offset<Vector<T>> CreateVector(const T *v, size_t len) { |
| 948 | StartVector(len, sizeof(T)); |
| 949 | for (auto i = len; i > 0; ) { |
| 950 | PushElement(v[--i]); |
| 951 | } |
| 952 | return Offset<Vector<T>>(EndVector(len)); |
| 953 | } |
| 954 | |
| 955 | /// @brief Serialize a `std::vector` into a FlatBuffer `vector`. |
| 956 | /// @tparam T The data type of the `std::vector` elements. |
no test coverage detected