mirror of
https://github.com/google/flatbuffers.git
synced 2026-06-15 00:38:52 +00:00
The asserts replaced by FLATBUFFERS_ASSERT. (#4701)
* The asserts replaced by FLATBUFFERS_ASSERT. Several asserts have converted to static_asserts. * Regenerate header monster generate_code.sh
This commit is contained in:
committed by
Wouter van Oortmerssen
parent
86153fd740
commit
a66f9e769b
@@ -9,6 +9,10 @@
|
||||
|
||||
#include <assert.h>
|
||||
|
||||
#if !defined(FLATBUFFERS_ASSERT)
|
||||
#define FLATBUFFERS_ASSERT assert
|
||||
#endif
|
||||
|
||||
#ifndef ARDUINO
|
||||
#include <cstdint>
|
||||
#endif
|
||||
@@ -209,7 +213,7 @@ template<typename T> T EndianSwap(T t) {
|
||||
u.i = FLATBUFFERS_BYTESWAP64(u.i);
|
||||
return u.t;
|
||||
} else {
|
||||
assert(0);
|
||||
FLATBUFFERS_ASSERT(0);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user