mirror of
https://github.com/google/flatbuffers.git
synced 2026-06-02 12:05:50 +00:00
Fixed TypeTable function not being inline.
Change-Id: Id335980daf909e885ed26a21b64623b78d01fb49 Tested: on OS X.
This commit is contained in:
@@ -592,7 +592,7 @@ class CppGenerator : public BaseGenerator {
|
||||
|
||||
void GenMiniReflectPre(const StructDef *struct_def) {
|
||||
code_.SetValue("NAME", struct_def->name);
|
||||
code_ += "flatbuffers::TypeTable *{{NAME}}TypeTable();";
|
||||
code_ += "inline flatbuffers::TypeTable *{{NAME}}TypeTable();";
|
||||
code_ += "";
|
||||
}
|
||||
|
||||
@@ -691,7 +691,7 @@ class CppGenerator : public BaseGenerator {
|
||||
code_.SetValue("REFS", rs);
|
||||
code_.SetValue("NAMES", ns);
|
||||
code_.SetValue("VALUES", vs);
|
||||
code_ += "flatbuffers::TypeTable *{{NAME}}TypeTable() {";
|
||||
code_ += "inline flatbuffers::TypeTable *{{NAME}}TypeTable() {";
|
||||
if (num_fields) {
|
||||
code_ += " static flatbuffers::TypeCode type_codes[] = {";
|
||||
code_ += " {{TYPES}}";
|
||||
|
||||
Reference in New Issue
Block a user