Reset minimum alignment when reusing FlatBufferBuilder

Previously, if you were re-using instances of FlatBufferBuilder
and an earlier buffer would use a 64bit item where later ones
do not, you could be wasting space.

Change-Id: Ic8090a38f97ce73194e991ba72bcfae74a7ace9f
Tested: on Linux.
This commit is contained in:
Wouter van Oortmerssen 2015-02-04 15:30:47 -08:00
parent b0910e75e0
commit 85f64786da
1 changed files with 1 additions and 0 deletions

View File

@ -454,6 +454,7 @@ class FlatBufferBuilder FLATBUFFERS_FINAL_CLASS {
buf_.clear();
offsetbuf_.clear();
vtables_.clear();
minalign_ = 1;
}
// The current size of the serialized buffer, counting from the end.