| 2216 | /// @cond FLATBUFFERS_INTERNAL |
| 2217 | // Helpers to get a typed pointer to the root object contained in the buffer. |
| 2218 | template<typename T> T *GetMutableRoot(void *buf) { |
| 2219 | EndianCheck(); |
| 2220 | return reinterpret_cast<T *>( |
| 2221 | reinterpret_cast<uint8_t *>(buf) + |
| 2222 | EndianScalar(*reinterpret_cast<uoffset_t *>(buf))); |
| 2223 | } |
| 2224 | |
| 2225 | template<typename T> const T *GetRoot(const void *buf) { |
| 2226 | return GetMutableRoot<T>(const_cast<void *>(buf)); |
nothing calls this directly
no test coverage detected