diff options
author | Wouter van Oortmerssen <aardappel@gmail.com> | 2017-08-21 13:44:23 -0700 |
---|---|---|
committer | Wouter van Oortmerssen <aardappel@gmail.com> | 2017-08-24 09:35:54 -0700 |
commit | ac1015e3c417ecb18d8f449a4e6aaaff3c4f53b9 (patch) | |
tree | d45f46b9674d6b260a483d62eb2f9fc718935a9c /src/reflection.cpp | |
parent | 513958ea724dadbf55d502dd66d382657703e234 (diff) | |
download | flatbuffers-ac1015e3c417ecb18d8f449a4e6aaaff3c4f53b9.tar.gz flatbuffers-ac1015e3c417ecb18d8f449a4e6aaaff3c4f53b9.tar.bz2 flatbuffers-ac1015e3c417ecb18d8f449a4e6aaaff3c4f53b9.zip |
Trimmed vtables of trailing zeroes.
This is something the format supports, but none of the builders
were doing. Can save 10-20% on FlatBuffer binary size!
Also fixed the Go tests.
Change-Id: I616c56ce9bbcfcaee23aa24f0532fcb60b6a8c75
Tested: on Linux.
Diffstat (limited to 'src/reflection.cpp')
-rw-r--r-- | src/reflection.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/reflection.cpp b/src/reflection.cpp index 2eee4616..2f05a34c 100644 --- a/src/reflection.cpp +++ b/src/reflection.cpp @@ -481,7 +481,7 @@ Offset<const Table *> CopyTable(FlatBufferBuilder &fbb, fbb.ClearOffsets(); return fbb.EndStruct(); } else { - return fbb.EndTable(start, static_cast<voffset_t>(fielddefs->size())); + return fbb.EndTable(start); } } |