From: Wouter van Oortmerssen Date: Tue, 12 Aug 2014 23:49:37 +0000 (-0700) Subject: Made the assert in the verifier optional X-Git-Tag: v1.0.1~1 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=f2908b778775c5d3341519e781b5ff5cd5b191f1;p=platform%2Fupstream%2Fflatbuffers.git Made the assert in the verifier optional Change-Id: Ie6b0a8e137a0743bbf18531f29712cf5f11bf34f Tested: on Linux --- diff --git a/include/flatbuffers/flatbuffers.h b/include/flatbuffers/flatbuffers.h index d5f53bf..91dce85 100644 --- a/include/flatbuffers/flatbuffers.h +++ b/include/flatbuffers/flatbuffers.h @@ -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; }