Made the assert in the verifier optional

Change-Id: Ie6b0a8e137a0743bbf18531f29712cf5f11bf34f
Tested: on Linux
This commit is contained in:
Wouter van Oortmerssen 2014-08-12 16:49:37 -07:00
parent 0b47e69d4d
commit f2908b7787
1 changed files with 3 additions and 1 deletions

View File

@ -676,7 +676,9 @@ class Verifier {
// Verify any range within the buffer.
bool Verify(const void *elem, size_t elem_len) const {
bool ok = elem >= buf_ && elem <= end_ - elem_len;
assert(ok);
#ifdef FLATBUFFERS_DEBUG_VERIFICATION_FAILURE
assert(ok);
#endif
return ok;
}