Fix union initialization

Using {} as an initializer fails on MSVC

Signed-off-by: Paolo Borelli <pborelli@gnome.org>
This commit is contained in:
Paolo Borelli 2016-02-02 14:09:23 +01:00 committed by Robert Edmonds
parent 1d4aff9648
commit af613f932a

View File

@ -236,8 +236,8 @@ GenerateStructDefinition(io::Printer* printer) {
vars["foneofname"] = FullNameToUpper(oneof->full_name());
// Initialize the case enum
printer->Print(vars, ", $foneofname$__NOT_SET");
// Initialize the enum
printer->Print(", {}");
// Initialize the union
printer->Print(", {0}");
}
printer->Print(" }\n\n\n");