mirror of
https://github.com/google/flatbuffers.git
synced 2026-06-03 12:21:23 +00:00
Fixed Windows build errors.
Change-Id: I11548bfa3cfe307598eb59c56412974c349d614d
This commit is contained in:
@@ -525,9 +525,7 @@ class CppGenerator : public BaseGenerator {
|
||||
if (parser_.opts.generate_object_based_api && enum_def.is_union) {
|
||||
// Generate a union type
|
||||
code += "struct " + enum_def.name + "Union {\n";
|
||||
code += " " + enum_def.name + " type = ";
|
||||
code += GetEnumValUse(enum_def, *enum_def.vals.Lookup("NONE"), parser_.opts);
|
||||
code += ";\n\n";
|
||||
code += " " + enum_def.name + " type;\n\n";
|
||||
code += " flatbuffers::NativeTable *table = nullptr;\n";
|
||||
code += " " + enum_def.name + "Union() : type(";
|
||||
code += GetEnumValUse(enum_def, *enum_def.vals.Lookup("NONE"), parser_.opts);
|
||||
|
||||
Reference in New Issue
Block a user