From a5104aa614bc3df2de719328e37a1bd96f68732c Mon Sep 17 00:00:00 2001 From: mappu Date: Tue, 27 Aug 2024 18:44:58 +1200 Subject: [PATCH] genbindings/transformtypedefs: clean up dead code --- cmd/genbindings/transformtypedefs.go | 21 +-------------------- 1 file changed, 1 insertion(+), 20 deletions(-) diff --git a/cmd/genbindings/transformtypedefs.go b/cmd/genbindings/transformtypedefs.go index 75e49451..1c5be1d2 100644 --- a/cmd/genbindings/transformtypedefs.go +++ b/cmd/genbindings/transformtypedefs.go @@ -1,23 +1,5 @@ package main -/* -func typedefUnderlyingOrInt(td CppTypedef) string { - if strings.HasPrefix(td.UnderlyingType.ParameterType, "QFlag<") { - return "int" - } - - if strings.HasPrefix(td.UnderlyingType.ParameterType, "signed ") { - return td.UnderlyingType.ParameterType[7:] - } - - if strings.Contains(td.UnderlyingType.ParameterType, "(*)") { - return "uintptr" // Function pointer, nonrepresentible - } - - return td.UnderlyingType.ParameterType -} -*/ - // astTransformTypedefs replaces the ParameterType with any known typedef value. func astTransformTypedefs(parsed *CppParsedHeader) { @@ -34,7 +16,6 @@ func astTransformTypedefs(parsed *CppParsedHeader) { if td, ok := KnownTypedefs[m.ReturnType.ParameterType]; ok { m.ReturnType = td.UnderlyingType.CopyWithAlias(m.ReturnType) - //m.ReturnType.AssignAlias(typedefUnderlyingOrInt(td)) } c.Methods[j] = m } @@ -43,7 +24,7 @@ func astTransformTypedefs(parsed *CppParsedHeader) { for k, p := range m.Parameters { if td, ok := KnownTypedefs[p.ParameterType]; ok { - p = td.UnderlyingType.CopyWithAlias(p) // .AssignAlias(typedefUnderlyingOrInt(td)) + p = td.UnderlyingType.CopyWithAlias(p) } m.Parameters[k] = p }