mirror of
https://github.com/mappu/miqt.git
synced 2025-02-08 22:10:23 +00:00
genbindings/cabi: zero values in CABI should use enum's underlying type
This commit is contained in:
parent
f192a6a330
commit
78fae7cbcb
@ -616,10 +616,13 @@ func getCabiZeroValue(p CppParameter) string {
|
||||
|
||||
if p.Pointer {
|
||||
return getCppZeroValue(p)
|
||||
} else if p.IsKnownEnum() {
|
||||
return getCppZeroValue(p)
|
||||
} else if ev, ok := KnownEnums[p.ParameterType]; ok {
|
||||
// In CABI the zero value may be the underlying type of an enum instead
|
||||
return "(" + ev.Enum.UnderlyingType.RenderTypeCabi() + ")(0)"
|
||||
|
||||
} else if p.IntType() {
|
||||
return getCppZeroValue(p)
|
||||
return getCppZeroValue(p) // default
|
||||
|
||||
} else if p.ParameterType == "bool" {
|
||||
return getCppZeroValue(p)
|
||||
} else if p.ParameterType == "void" {
|
||||
|
Loading…
x
Reference in New Issue
Block a user