mirror of
https://github.com/vee1e/flatbuffers.git
synced 2026-09-04 11:17:38 +00:00
Enforcing CreateUninitializedVector is only used with scalars.
This function cannot work with any offset types (since offsets must always point forward) so this avoid possible mistakes. Change-Id: I1b3dfbefc8d40da630345b9b04f9aff4a990e8e5
This commit is contained in:
parent
c7a797b966
commit
4cfe36ae8e
1 changed files with 1 additions and 0 deletions
|
|
@ -1540,6 +1540,7 @@ class FlatBufferBuilder {
|
|||
/// in the buffer.
|
||||
template<typename T>
|
||||
Offset<Vector<T>> CreateUninitializedVector(size_t len, T **buf) {
|
||||
AssertScalarT<T>();
|
||||
return CreateUninitializedVector(len, sizeof(T),
|
||||
reinterpret_cast<uint8_t **>(buf));
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue