@brief Get a pointer to the the file_identifier section of the buffer. @return Returns a const char pointer to the start of the file_identifier characters in the buffer. The returned char * has length 'flatbuffers::FlatBufferBuilder::kFileIdentifierLength'. This function is UNDEFINED for FlatBuffers whose schema does not include a file_identifier (likely points at padding or the start of a the ro
| 2252 | /// a file_identifier (likely points at padding or the start of a the root |
| 2253 | /// vtable). |
| 2254 | inline const char *GetBufferIdentifier(const void *buf, |
| 2255 | bool size_prefixed = false) { |
| 2256 | return reinterpret_cast<const char *>(buf) + |
| 2257 | ((size_prefixed) ? 2 * sizeof(uoffset_t) : sizeof(uoffset_t)); |
| 2258 | } |
| 2259 | |
| 2260 | // Helper to see if the identifier in a buffer has the expected value. |
| 2261 | inline bool BufferHasIdentifier(const void *buf, const char *identifier, |
no outgoing calls
no test coverage detected