mirror of
https://github.com/protobuf-c/protobuf-c.git
synced 2024-12-27 13:31:02 +08:00
Fix union initialization
Using {} as an initializer fails on MSVC Signed-off-by: Paolo Borelli <pborelli@gnome.org>
This commit is contained in:
parent
1d4aff9648
commit
af613f932a
@ -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");
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user