Added support for easy string pooling.

Change-Id: I790cf681c1bffff800d77afb0e2f908d1c827679
Tested: on Linux.
Bug: 26186542
This commit is contained in:
Wouter van Oortmerssen
2016-02-29 15:47:46 -08:00
parent 19afcdc704
commit 958fc6ec49
4 changed files with 102 additions and 15 deletions

View File

@@ -415,12 +415,14 @@ inline bool SetFieldT(Table *table, const reflection::Field &field,
// above resizing functionality has introduced garbage in a buffer you want
// to remove.
// Note: this does not deal with DAGs correctly. If the table passed forms a
// DAG, the copy will be a tree instead (with duplicates).
// DAG, the copy will be a tree instead (with duplicates). Strings can be
// shared however, by passing true for use_string_pooling.
Offset<const Table *> CopyTable(FlatBufferBuilder &fbb,
const reflection::Schema &schema,
const reflection::Object &objectdef,
const Table &table);
const Table &table,
bool use_string_pooling = false);
} // namespace flatbuffers