mirror of
https://github.com/mappu/miqt.git
synced 2025-04-03 04:10:22 +00:00
genbindings: remove special-case qreal handling
This commit is contained in:
parent
d5eeb64c86
commit
6d09ef795b
@ -465,9 +465,6 @@ func parseSingleTypeString(p string) CppParameter {
|
||||
insert.ByRef = true
|
||||
} else if tok == "*" {
|
||||
insert.Pointer = true
|
||||
} else if tok == "qreal" {
|
||||
// Transform typedef
|
||||
insert.ParameterType += " double"
|
||||
} else if tok == "WId" {
|
||||
// Transform typedef
|
||||
insert.ParameterType += " uintptr_t"
|
||||
|
@ -35,6 +35,8 @@ func (p CppParameter) RenderTypeCpp() string {
|
||||
ret = "_Float16" // No idea where this typedef comes from, but it exists
|
||||
case "qsizetype":
|
||||
ret = "size_t"
|
||||
case "qreal":
|
||||
ret = "double"
|
||||
case "qintptr":
|
||||
ret = "uintptr_t"
|
||||
case "QRgb":
|
||||
|
@ -78,7 +78,7 @@ func (p CppParameter) RenderTypeGo() string {
|
||||
ret += "uint64"
|
||||
case "float":
|
||||
ret += "float32"
|
||||
case "double":
|
||||
case "double", "qreal":
|
||||
ret += "float64"
|
||||
case "qsizetype":
|
||||
if C.sizeof_size_t == 4 {
|
||||
|
Loading…
x
Reference in New Issue
Block a user