| 2525 | |
| 2526 | template<typename T> |
| 2527 | bool VerifyBufferFromStart(const char *identifier, size_t start) { |
| 2528 | if (identifier && !Check((size_ >= 2 * sizeof(flatbuffers::uoffset_t) && |
| 2529 | BufferHasIdentifier(buf_ + start, identifier)))) { |
| 2530 | return false; |
| 2531 | } |
| 2532 | |
| 2533 | // Call T::Verify, which must be in the generated code for this type. |
| 2534 | auto o = VerifyOffset(start); |
| 2535 | return o && reinterpret_cast<const T *>(buf_ + start + o)->Verify(*this) |
| 2536 | // clang-format off |
| 2537 | #ifdef FLATBUFFERS_TRACK_VERIFIER_BUFFER_SIZE |
| 2538 | && GetComputedSize() |
| 2539 | #endif |
| 2540 | ; |
| 2541 | // clang-format on |
| 2542 | } |
| 2543 | |
| 2544 | // Verify this whole buffer, starting with root type T. |
| 2545 | template<typename T> bool VerifyBuffer() { return VerifyBuffer<T>(nullptr); } |
nothing calls this directly
no test coverage detected