// verifier function to call, this should be safe even if the union type
// has been corrupted, since the verifiers will simply fail when called
// on the wrong type.
- auto signature = "bool Verify" + enum_def.name +
+ auto signature = "inline bool Verify" + enum_def.name +
"(flatbuffers::Verifier &verifier, " +
"const void *union_obj, uint8_t type)";
code += signature + ";\n\n";
inline const char *EnumNameAny(int e) { return EnumNamesAny()[e]; }
-bool VerifyAny(flatbuffers::Verifier &verifier, const void *union_obj, uint8_t type);
+inline bool VerifyAny(flatbuffers::Verifier &verifier, const void *union_obj, uint8_t type);
MANUALLY_ALIGNED_STRUCT(2) Test {
private:
return builder_.Finish();
}
-bool VerifyAny(flatbuffers::Verifier &verifier, const void *union_obj, uint8_t type) {
+inline bool VerifyAny(flatbuffers::Verifier &verifier, const void *union_obj, uint8_t type) {
switch (type) {
case Any_NONE: return true;
case Any_Monster: return verifier.VerifyTable(reinterpret_cast<const Monster *>(union_obj));