mirror of
https://github.com/mappu/miqt.git
synced 2025-04-03 20:20: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
|
insert.ByRef = true
|
||||||
} else if tok == "*" {
|
} else if tok == "*" {
|
||||||
insert.Pointer = true
|
insert.Pointer = true
|
||||||
} else if tok == "qreal" {
|
|
||||||
// Transform typedef
|
|
||||||
insert.ParameterType += " double"
|
|
||||||
} else if tok == "WId" {
|
} else if tok == "WId" {
|
||||||
// Transform typedef
|
// Transform typedef
|
||||||
insert.ParameterType += " uintptr_t"
|
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
|
ret = "_Float16" // No idea where this typedef comes from, but it exists
|
||||||
case "qsizetype":
|
case "qsizetype":
|
||||||
ret = "size_t"
|
ret = "size_t"
|
||||||
|
case "qreal":
|
||||||
|
ret = "double"
|
||||||
case "qintptr":
|
case "qintptr":
|
||||||
ret = "uintptr_t"
|
ret = "uintptr_t"
|
||||||
case "QRgb":
|
case "QRgb":
|
||||||
|
@ -78,7 +78,7 @@ func (p CppParameter) RenderTypeGo() string {
|
|||||||
ret += "uint64"
|
ret += "uint64"
|
||||||
case "float":
|
case "float":
|
||||||
ret += "float32"
|
ret += "float32"
|
||||||
case "double":
|
case "double", "qreal":
|
||||||
ret += "float64"
|
ret += "float64"
|
||||||
case "qsizetype":
|
case "qsizetype":
|
||||||
if C.sizeof_size_t == 4 {
|
if C.sizeof_size_t == 4 {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user