mirror of
https://github.com/google/flatbuffers.git
synced 2026-06-19 03:53:06 +00:00
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:
committed by
Wouter van Oortmerssen
parent
718ddea558
commit
fe83b68ac6
@@ -349,6 +349,12 @@ inline std::unique_ptr<MonsterExtraT> UnPackMonsterExtra(
|
||||
return std::unique_ptr<MonsterExtraT>(GetMonsterExtra(buf)->UnPack(res));
|
||||
}
|
||||
|
||||
inline std::unique_ptr<MonsterExtraT> UnPackSizePrefixedMonsterExtra(
|
||||
const void *buf,
|
||||
const flatbuffers::resolver_function_t *res = nullptr) {
|
||||
return std::unique_ptr<MonsterExtraT>(GetSizePrefixedMonsterExtra(buf)->UnPack(res));
|
||||
}
|
||||
|
||||
} // namespace MyGame
|
||||
|
||||
#endif // FLATBUFFERS_GENERATED_MONSTEREXTRA_MYGAME_H_
|
||||
|
||||
Reference in New Issue
Block a user