Added a CPP UnPackSizePrefixed<struct_name> generated helper function (#5350)

* Added a cpp  UnPackSizePrefixed<struct_name> generated helper function

Missing helper function added to the cpp API generator for unpacking size prefixed structures

* Added generated test files
This commit is contained in:
David Cowan
2019-05-20 14:01:44 -07:00
committed by Wouter van Oortmerssen
parent 718ddea558
commit fe83b68ac6
5 changed files with 32 additions and 0 deletions

View File

@@ -850,4 +850,10 @@ inline flatbuffers::unique_ptr<MovieT> UnPackMovie(
return flatbuffers::unique_ptr<MovieT>(GetMovie(buf)->UnPack(res));
}
inline flatbuffers::unique_ptr<MovieT> UnPackSizePrefixedMovie(
const void *buf,
const flatbuffers::resolver_function_t *res = nullptr) {
return flatbuffers::unique_ptr<MovieT>(GetSizePrefixedMovie(buf)->UnPack(res));
}
#endif // FLATBUFFERS_GENERATED_UNIONVECTOR_H_