Public accessor for buffer size of flexbuffers::Builder

Change-Id: Iff7895aebeba9c2940e26a3edbdf2d3f1b0d9b17
This commit is contained in:
Wouter van Oortmerssen
2017-08-07 13:24:42 -07:00
parent a2b1bfc107
commit a64d968473

View File

@@ -802,6 +802,11 @@ class Builder FLATBUFFERS_FINAL_CLASS {
return buf_;
}
// Size of the buffer. Does not include unfinished values.
size_t GetSize() const {
return buf_.size();
}
// Reset all state so we can re-use the buffer.
void Clear() {
buf_.clear();