Public accessor for buffer size of flexbuffers::Builder

Change-Id: Iff7895aebeba9c2940e26a3edbdf2d3f1b0d9b17
parent a2b1bfc1
...@@ -802,6 +802,11 @@ class Builder FLATBUFFERS_FINAL_CLASS { ...@@ -802,6 +802,11 @@ class Builder FLATBUFFERS_FINAL_CLASS {
return buf_; 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. // Reset all state so we can re-use the buffer.
void Clear() { void Clear() {
buf_.clear(); buf_.clear();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment