mirror of
https://github.com/vee1e/flatbuffers.git
synced 2026-09-02 02:07:25 +00:00
[C++] Add GetMutableSizePrefixedRoot and generate GetMutableSizePrefixedXxx functions (#6815)
* flattests_cpp17 doesn't compile with Visual Studio 2017: warning C4100: 'indent': unreferenced formal parameter stringify_util.h(127): error C2220: warning treated as error - no 'object' file generated stringify_util.h(127): warning C4100: 'indent': unreferenced formal parameter stringify_util.h(85): warning C4100: 'indent': unreferenced formal parameter stringify_util.h(85): warning C4100: 'fbs': unreferenced formal parameter * [C++] Add GetMutableSizePrefixedRoot() and generate a GetMutableSizePrefixed function When using the mutable API together with size prefixed buffers these functions should be present. * clang-format * Cleanup branch for PR Revert "flattests_cpp17 doesn't compile with Visual Studio 2017: warning C4100: 'indent': unreferenced formal parameter" This reverts commit a92055203e3c26b69df4896d6babd7714539307a.
This commit is contained in:
parent
ae145293cc
commit
b20c4d3aad
12 changed files with 56 additions and 0 deletions
|
|
@ -3677,6 +3677,10 @@ inline Monster *GetMutableMonster(void *buf) {
|
|||
return flatbuffers::GetMutableRoot<Monster>(buf);
|
||||
}
|
||||
|
||||
inline MyGame::Example::Monster *GetMutableSizePrefixedMonster(void *buf) {
|
||||
return flatbuffers::GetMutableSizePrefixedRoot<MyGame::Example::Monster>(buf);
|
||||
}
|
||||
|
||||
inline const char *MonsterIdentifier() {
|
||||
return "MONS";
|
||||
}
|
||||
|
|
|
|||
|
|
@ -933,6 +933,10 @@ inline ScalarStuff *GetMutableScalarStuff(void *buf) {
|
|||
return flatbuffers::GetMutableRoot<ScalarStuff>(buf);
|
||||
}
|
||||
|
||||
inline optional_scalars::ScalarStuff *GetMutableSizePrefixedScalarStuff(void *buf) {
|
||||
return flatbuffers::GetMutableSizePrefixedRoot<optional_scalars::ScalarStuff>(buf);
|
||||
}
|
||||
|
||||
inline const char *ScalarStuffIdentifier() {
|
||||
return "NULL";
|
||||
}
|
||||
|
|
|
|||
|
|
@ -798,6 +798,10 @@ inline Movie *GetMutableMovie(void *buf) {
|
|||
return flatbuffers::GetMutableRoot<Movie>(buf);
|
||||
}
|
||||
|
||||
inline Movie *GetMutableSizePrefixedMovie(void *buf) {
|
||||
return flatbuffers::GetMutableSizePrefixedRoot<Movie>(buf);
|
||||
}
|
||||
|
||||
inline const char *MovieIdentifier() {
|
||||
return "MOVI";
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue