mirror of
https://github.com/google/flatbuffers.git
synced 2026-06-18 00:46:32 +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:
@@ -105,7 +105,7 @@ struct TableInNestedNSBuilder {
|
||||
}
|
||||
TableInNestedNSBuilder &operator=(const TableInNestedNSBuilder &);
|
||||
flatbuffers::Offset<TableInNestedNS> Finish() {
|
||||
const auto end = fbb_.EndTable(start_, 1);
|
||||
const auto end = fbb_.EndTable(start_);
|
||||
auto o = flatbuffers::Offset<TableInNestedNS>(end);
|
||||
return o;
|
||||
}
|
||||
|
||||
@@ -76,7 +76,7 @@ struct TableInFirstNSBuilder {
|
||||
}
|
||||
TableInFirstNSBuilder &operator=(const TableInFirstNSBuilder &);
|
||||
flatbuffers::Offset<TableInFirstNS> Finish() {
|
||||
const auto end = fbb_.EndTable(start_, 3);
|
||||
const auto end = fbb_.EndTable(start_);
|
||||
auto o = flatbuffers::Offset<TableInFirstNS>(end);
|
||||
return o;
|
||||
}
|
||||
@@ -140,7 +140,7 @@ struct TableInCBuilder {
|
||||
}
|
||||
TableInCBuilder &operator=(const TableInCBuilder &);
|
||||
flatbuffers::Offset<TableInC> Finish() {
|
||||
const auto end = fbb_.EndTable(start_, 2);
|
||||
const auto end = fbb_.EndTable(start_);
|
||||
auto o = flatbuffers::Offset<TableInC>(end);
|
||||
return o;
|
||||
}
|
||||
@@ -190,7 +190,7 @@ struct SecondTableInABuilder {
|
||||
}
|
||||
SecondTableInABuilder &operator=(const SecondTableInABuilder &);
|
||||
flatbuffers::Offset<SecondTableInA> Finish() {
|
||||
const auto end = fbb_.EndTable(start_, 1);
|
||||
const auto end = fbb_.EndTable(start_);
|
||||
auto o = flatbuffers::Offset<SecondTableInA>(end);
|
||||
return o;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user