From 275b739944a2f31fec5fa3605de5169cdbf99f3d Mon Sep 17 00:00:00 2001 From: Derek Bailey Date: Fri, 15 Apr 2022 11:56:34 -0700 Subject: [PATCH] allow overriding FLATBUFFERS_MAX_ALIGNMENT --- include/flatbuffers/base.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/include/flatbuffers/base.h b/include/flatbuffers/base.h index 458ac3f79..1d59cc703 100644 --- a/include/flatbuffers/base.h +++ b/include/flatbuffers/base.h @@ -329,7 +329,9 @@ typedef uintmax_t largest_scalar_t; #define FLATBUFFERS_MAX_BUFFER_SIZE ((1ULL << (sizeof(::flatbuffers::soffset_t) * 8 - 1)) - 1) // We support aligning the contents of buffers up to this size. -#define FLATBUFFERS_MAX_ALIGNMENT 16 +#ifndef FLATBUFFERS_MAX_ALIGNMENT + #define FLATBUFFERS_MAX_ALIGNMENT 16 +#endif /// @brief The length of a FlatBuffer file header. static const size_t kFileIdentifierLength = 4;