mirror of
https://github.com/google/flatbuffers.git
synced 2026-06-02 04:04:19 +00:00
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.
This commit is contained in:
@@ -1071,8 +1071,7 @@ CheckedError Parser::ParseTable(const StructDef &struct_def, std::string *value,
|
||||
builder_.PopBytes(struct_def.bytesize);
|
||||
assert(!ovalue);
|
||||
} else {
|
||||
auto val = builder_.EndTable(start,
|
||||
static_cast<voffset_t>(struct_def.fields.vec.size()));
|
||||
auto val = builder_.EndTable(start);
|
||||
if (ovalue) *ovalue = val;
|
||||
if (value) *value = NumToString(val);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user