mirror of
https://github.com/mappu/miqt.git
synced 2025-01-05 15:18:38 +00:00
genbindings: remove some redundant casts now that PVoids are gone
This commit is contained in:
parent
97b9e01451
commit
97402096cc
@ -355,13 +355,13 @@ func emitBindingCpp(src *CppParsedHeader, filename string) (string, error) {
|
|||||||
ret.WriteString(fmt.Sprintf(
|
ret.WriteString(fmt.Sprintf(
|
||||||
"%s %s_%s(%s) {\n"+
|
"%s %s_%s(%s) {\n"+
|
||||||
"%s"+
|
"%s"+
|
||||||
"\t%sstatic_cast<%s*>(self)->%s(%s);\n"+
|
"\t%sself->%s(%s);\n"+
|
||||||
"%s"+
|
"%s"+
|
||||||
"}\n"+
|
"}\n"+
|
||||||
"\n",
|
"\n",
|
||||||
emitReturnTypeCabi(m.ReturnType), c.ClassName, m.SafeMethodName(), emitParametersCabi(m, c.ClassName+"*"),
|
emitReturnTypeCabi(m.ReturnType), c.ClassName, m.SafeMethodName(), emitParametersCabi(m, c.ClassName+"*"),
|
||||||
preamble,
|
preamble,
|
||||||
shouldReturn, c.ClassName, nativeMethodName, forwarding,
|
shouldReturn, nativeMethodName, forwarding,
|
||||||
afterCall,
|
afterCall,
|
||||||
))
|
))
|
||||||
}
|
}
|
||||||
@ -369,11 +369,10 @@ func emitBindingCpp(src *CppParsedHeader, filename string) (string, error) {
|
|||||||
// Delete
|
// Delete
|
||||||
ret.WriteString(fmt.Sprintf(
|
ret.WriteString(fmt.Sprintf(
|
||||||
"void %s_Delete(%s* self) {\n"+
|
"void %s_Delete(%s* self) {\n"+
|
||||||
"\tdelete static_cast<%s*>(self);\n"+
|
"\tdelete self;\n"+
|
||||||
"}\n"+
|
"}\n"+
|
||||||
"\n",
|
"\n",
|
||||||
c.ClassName, c.ClassName,
|
c.ClassName, c.ClassName,
|
||||||
c.ClassName,
|
|
||||||
))
|
))
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user