flatbuffers icon indicating copy to clipboard operation
flatbuffers copied to clipboard

[C++] Object API - Skip including empty vectors

Open dbaileychess opened this issue 3 years ago • 1 comments

In C++ Object API, the generate ObjectT contain empty std::vector<T> that are then serialized in the generated Pack function. There is no check if the vector is empty, so it will create a vector of size 0 (which increases the size of the binary).

dbaileychess avatar Apr 15 '22 22:04 dbaileychess

It's also semantically wrong if we're going to give users control over nullability of vectors as per #6053

CasperN avatar Apr 15 '22 23:04 CasperN

This issue is stale because it has been open 6 months with no activity. Please comment or label not-stale, or this will be closed in 14 days.

github-actions[bot] avatar Mar 04 '23 01:03 github-actions[bot]

This issue was automatically closed due to no activity for 6 months plus the 14 day notice period.

github-actions[bot] avatar Mar 19 '23 20:03 github-actions[bot]