mirror of
https://github.com/google/flatbuffers.git
synced 2026-06-03 04:21:13 +00:00
A generated C++ function was missing "inline".
This would cause double definition linker errors when included in multiple compilation units. Change-Id: Ie6fd4af018055a099343182a92a7776f2fea4725 Tested: on Linux.
This commit is contained in:
@@ -165,7 +165,7 @@ static void GenEnum(EnumDef &enum_def, std::string *code_ptr,
|
||||
// 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";
|
||||
|
||||
Reference in New Issue
Block a user