genbindings: skip return types for more operator= overloads

This commit is contained in:
mappu 2024-08-25 15:32:16 +12:00
parent e3a1041031
commit 38ceda38ad

View File

@ -492,7 +492,10 @@ func parseMethod(node map[string]interface{}, mm *CppMethod) error {
// Change operator= (assign) to always return void. By default it returns *self which // Change operator= (assign) to always return void. By default it returns *self which
// is a trick for more ergnonomic C++ that has no real effect // is a trick for more ergnonomic C++ that has no real effect
if mm.MethodName == "operator=" { if mm.MethodName == "operator=" ||
mm.MethodName == "operator&=" || // qbitarray.h
mm.MethodName == "operator|=" || // qbitarray.h
mm.MethodName == "operator^=" { // qbitarray.h
mm.ReturnType = CppParameter{ParameterType: "void"} mm.ReturnType = CppParameter{ParameterType: "void"}
} }