mirror of
https://github.com/google/flatbuffers.git
synced 2026-06-04 12:43:24 +00:00
We already know the underlying_type.
We just need to pass it to DEFINE_BITMASK_OPERATORS macro
This commit is contained in:
@@ -184,7 +184,7 @@ static void GenEnum(const Parser &parser, EnumDef &enum_def,
|
||||
code += GenEnumVal(enum_def, maxv->name, parser.opts) + "\n";
|
||||
code += "};\n";
|
||||
if (parser.opts.scoped_enums && enum_def.attributes.Lookup("bit_flags"))
|
||||
code += "DEFINE_BITMASK_OPERATORS(" + enum_def.name + ")\n";
|
||||
code += "DEFINE_BITMASK_OPERATORS(" + enum_def.name + ", " + GenTypeBasic(enum_def.underlying_type, false) + ")\n";
|
||||
code += "\n";
|
||||
|
||||
// Generate a generate string table for enum values.
|
||||
|
||||
Reference in New Issue
Block a user