mirror of
https://github.com/google/flatbuffers.git
synced 2026-06-25 14:48:40 +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 a92055203e.
This commit is contained in:
@@ -457,6 +457,10 @@ inline ArrayTable *GetMutableArrayTable(void *buf) {
|
||||
return flatbuffers::GetMutableRoot<ArrayTable>(buf);
|
||||
}
|
||||
|
||||
inline MyGame::Example::ArrayTable *GetMutableSizePrefixedArrayTable(void *buf) {
|
||||
return flatbuffers::GetMutableSizePrefixedRoot<MyGame::Example::ArrayTable>(buf);
|
||||
}
|
||||
|
||||
inline const char *ArrayTableIdentifier() {
|
||||
return "ARRT";
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user