mirror of
https://github.com/google/flatbuffers.git
synced 2026-11-07 20:59:10 +00:00
Compare commits
3
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
3f4f0497ea | ||
|
|
6dda43bbaa | ||
|
|
9a8a511b52 |
@@ -271,7 +271,7 @@ namespace flatbuffers {
|
||||
#if (defined(_MSC_VER) && _MSC_VER >= 1800) || \
|
||||
(defined(__ANDROID__) && defined(__ANDROID_API__) && __ANDROID_API__>= 26) || \
|
||||
(defined(_XOPEN_VERSION) && (_XOPEN_VERSION >= 700)) && \
|
||||
!defined(__Fuchsia__)
|
||||
!defined(__Fuchsia__) && (!defined(__linux__) || defined(__GLIBC__))
|
||||
#define FLATBUFFERS_LOCALE_INDEPENDENT 1
|
||||
#else
|
||||
#define FLATBUFFERS_LOCALE_INDEPENDENT 0
|
||||
|
||||
+1
-1
@@ -404,7 +404,7 @@ class CppGenerator : public BaseGenerator {
|
||||
code_ += "struct {{STRUCT_NAME}}BinarySchema {";
|
||||
code_ += " static const uint8_t *data() {";
|
||||
code_ += " // Buffer containing the binary schema.";
|
||||
code_ += " static const uint8_t bfbsData[" +
|
||||
code_ += " alignas(uint64_t) static const uint8_t bfbsData[" +
|
||||
NumToString(parser_.builder_.GetSize()) + "] = {";
|
||||
code_ += binary_schema_hex_text;
|
||||
code_ += " };";
|
||||
|
||||
@@ -12,7 +12,7 @@ namespace Example {
|
||||
struct MonsterBinarySchema {
|
||||
static const uint8_t *data() {
|
||||
// Buffer containing the binary schema.
|
||||
static const uint8_t bfbsData[14520] = {
|
||||
alignas(uint64_t) static const uint8_t bfbsData[14520] = {
|
||||
0x20,0x00,0x00,0x00,0x42,0x46,0x42,0x53,0x00,0x00,0x00,0x00,0x14,0x00,0x20,0x00,0x04,0x00,0x08,0x00,
|
||||
0x0C,0x00,0x10,0x00,0x14,0x00,0x18,0x00,0x00,0x00,0x1C,0x00,0x14,0x00,0x00,0x00,0x58,0x00,0x00,0x00,
|
||||
0x34,0x00,0x00,0x00,0x24,0x00,0x00,0x00,0x18,0x00,0x00,0x00,0x70,0x0D,0x00,0x00,0x08,0x00,0x00,0x00,
|
||||
|
||||
Reference in New Issue
Block a user