mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Add default initializers for primitive fields in IPDL structs. (bug 1154522, r=billm)
This commit is contained in:
parent
1b782a5d02
commit
6a1a144862
@ -2057,6 +2057,12 @@ def _generateCxxStruct(sd):
|
||||
# Struct()
|
||||
defctor = ConstructorDefn(ConstructorDecl(sd.name))
|
||||
defctor.addstmt(StmtExpr(callinit))
|
||||
defctor.memberinits = []
|
||||
for f in sd.fields:
|
||||
# Only generate default values for primitives.
|
||||
if not (f.ipdltype.isCxx() and f.ipdltype.isAtom()):
|
||||
continue
|
||||
defctor.memberinits.append(ExprMemberInit(f.memberVar()))
|
||||
struct.addstmts([ defctor, Whitespace.NL ])
|
||||
|
||||
# Struct(const field1& _f1, ...)
|
||||
|
Loading…
Reference in New Issue
Block a user