mirror of
https://github.com/google/flatbuffers.git
synced 2026-06-18 22:38:56 +00:00
Add new c++ helpers to ease usage of size prefixed FlatBuffers (#4626)
It was missing some helpers when we choose to use size prefixed FlatBuffers. * Add general helper : GetPrefixedSize * Add generated helpers : * GetSizePrefixedXXX * VerfifySizePrefixedXXXBuffer * FinishSizePrefixedXXXBuffer
This commit is contained in:
committed by
Wouter van Oortmerssen
parent
19c81b11b3
commit
132e6a8220
@@ -2069,6 +2069,9 @@ inline const uint8_t *GetBufferStartFromRootPointer(const void *root) {
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
/// @brief This return the prefixed size of a FlatBuffer.
|
||||
inline uoffset_t GetPrefixedSize(const uint8_t* buf){ return ReadScalar<uoffset_t>(buf); }
|
||||
|
||||
// Base class for native objects (FlatBuffer data de-serialized into native
|
||||
// C++ data structures).
|
||||
// Contains no functionality, purely documentative.
|
||||
|
||||
Reference in New Issue
Block a user