Fixed TypeTable function not being inline.

Change-Id: Id335980daf909e885ed26a21b64623b78d01fb49
Tested: on OS X.
This commit is contained in:
Wouter van Oortmerssen
2017-09-25 11:44:58 -07:00
parent 03e2899985
commit 7a6b2bf521
8 changed files with 60 additions and 60 deletions

View File

@@ -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}}";