mirror of
https://github.com/google/flatbuffers.git
synced 2026-06-17 23:46:31 +00:00
Added "final" to generated types to block inheritance.
People sometimes accidentally inherit from these types. Bug: 18224703 Change-Id: Ia09489a834ac4941f9b4a46f240cbdcf456f03a1 Tested: on Windows and Linux.
This commit is contained in:
@@ -37,7 +37,7 @@ inline const char **EnumNamesAny() {
|
||||
|
||||
inline const char *EnumNameAny(Any e) { return EnumNamesAny()[e]; }
|
||||
|
||||
inline bool VerifyAny(flatbuffers::Verifier &verifier, const void *union_obj, uint8_t type);
|
||||
inline bool VerifyAny(flatbuffers::Verifier &verifier, const void *union_obj, Any type);
|
||||
|
||||
MANUALLY_ALIGNED_STRUCT(4) Vec3 {
|
||||
private:
|
||||
@@ -110,7 +110,7 @@ inline flatbuffers::Offset<Monster> CreateMonster(flatbuffers::FlatBufferBuilder
|
||||
return builder_.Finish();
|
||||
}
|
||||
|
||||
inline bool VerifyAny(flatbuffers::Verifier &verifier, const void *union_obj, uint8_t type) {
|
||||
inline bool VerifyAny(flatbuffers::Verifier &verifier, const void *union_obj, Any type) {
|
||||
switch (type) {
|
||||
case Any_NONE: return true;
|
||||
case Any_Monster: return verifier.VerifyTable(reinterpret_cast<const Monster *>(union_obj));
|
||||
|
||||
Reference in New Issue
Block a user