summaryrefslogtreecommitdiff
path: root/src/reflection.cpp
diff options
context:
space:
mode:
authorWouter van Oortmerssen <aardappel@gmail.com>2017-08-21 13:44:23 -0700
committerWouter van Oortmerssen <aardappel@gmail.com>2017-08-24 09:35:54 -0700
commitac1015e3c417ecb18d8f449a4e6aaaff3c4f53b9 (patch)
treed45f46b9674d6b260a483d62eb2f9fc718935a9c /src/reflection.cpp
parent513958ea724dadbf55d502dd66d382657703e234 (diff)
downloadflatbuffers-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.cpp2
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);
}
}