mirror of
https://github.com/mappu/miqt.git
synced 2025-01-05 07:08:39 +00:00
genbindings/clang: skip self pointer return from operator= overloads
This commit is contained in:
parent
fc62d963ea
commit
03f4f21d16
@ -490,6 +490,12 @@ func parseMethod(node map[string]interface{}, mm *CppMethod) error {
|
|||||||
mm.ReturnType = CppParameter{ParameterType: "void"}
|
mm.ReturnType = CppParameter{ParameterType: "void"}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 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
|
||||||
|
if mm.MethodName == "operator=" {
|
||||||
|
mm.ReturnType = CppParameter{ParameterType: "void"}
|
||||||
|
}
|
||||||
|
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user