mirror of
https://github.com/google/flatbuffers.git
synced 2026-06-11 15:37:27 +00:00
Test case for CreateVectorOfStructs() using a callback.
Fixes issue #4392, also fixed C++98 compatible code generation in tests. Change-Id: Ia5833026e615ad19d24a0439bdba2e3b45c5f86c
This commit is contained in:
@@ -1543,7 +1543,7 @@ class FlatBufferBuilder
|
||||
private:
|
||||
// Allocates space for a vector of structures.
|
||||
// Must be completed with EndVectorOfStructs().
|
||||
template<typename T> const T* StartVectorOfStructs(size_t vector_size) {
|
||||
template<typename T> T* StartVectorOfStructs(size_t vector_size) {
|
||||
StartVector(vector_size * sizeof(T) / AlignOf<T>(), AlignOf<T>());
|
||||
return reinterpret_cast<T *>(buf_.make_space(vector_size * sizeof(T)));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user