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 { func (c CppParsedHeader) Empty() bool {
return len(c.Typedefs) == 0 && // If there are only typedefs, that still counts as empty since typedefs
len(c.Enums) == 0 && // are fully resolved inside genbindings, not exposed in MIQT classes
len(c.Classes) == 0
return len(c.Enums) == 0 && len(c.Classes) == 0
} }
func (c *CppParsedHeader) AddContentFrom(other *CppParsedHeader) { func (c *CppParsedHeader) AddContentFrom(other *CppParsedHeader) {