MCPcopy Create free account
hub / github.com/TombEngine/TombEngine / VerifyBufferFromStart

Function VerifyBufferFromStart

Libs/flatbuffers/flatbuffers.h:2527–2542  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

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); }

Callers

nothing calls this directly

Calls 4

BufferHasIdentifierFunction · 0.85
VerifyOffsetFunction · 0.85
CheckFunction · 0.70
VerifyMethod · 0.45

Tested by

no test coverage detected