Commit fe2f8d32 authored by Jason Sanmiya's avatar Jason Sanmiya Committed by Wouter van Oortmerssen

Do not create empty enums.

Mac build issued a warning for enum{}.

Change-Id: I9cab958538ac3cec61aeae289d1da0118ecac15f
Tested: Mac build no longer issues warnings.
parent 45bda6e0
......@@ -260,6 +260,7 @@ static void GenTable(const Parser &parser, StructDef &struct_def,
code += " FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table";
code += " {\n";
// Generate field id constants.
if (struct_def.fields.vec.size() > 0) {
code += " enum {\n";
for (auto it = struct_def.fields.vec.begin();
it != struct_def.fields.vec.end();
......@@ -271,6 +272,7 @@ static void GenTable(const Parser &parser, StructDef &struct_def,
}
}
code += " };\n";
}
// Generate the accessors.
for (auto it = struct_def.fields.vec.begin();
it != struct_def.fields.vec.end();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment