genbindings/main: better handling for skipping empty files

This commit is contained in:
mappu 2024-10-21 19:09:02 +13:00
parent 7347073bd8
commit 24a41b18b5

View File

@ -367,9 +367,10 @@ type CppParsedHeader struct {
}
func (c CppParsedHeader) Empty() bool {
return len(c.Typedefs) == 0 &&
len(c.Enums) == 0 &&
len(c.Classes) == 0
// If there are only typedefs, that still counts as empty since typedefs
// are fully resolved inside genbindings, not exposed in MIQT classes
return len(c.Enums) == 0 && len(c.Classes) == 0
}
func (c *CppParsedHeader) AddContentFrom(other *CppParsedHeader) {