Merge two commits from movable-types-inputs

Performance optimisation for parameters passed by value that are C++11 movable.
  Test copy constructor and assignment operator calls for movable types

Conflicts:
	CHANGES.current
This commit is contained in:
William S Fulton 2022-07-12 09:48:17 +01:00
commit ea193a98f3
6 changed files with 53 additions and 3 deletions

View file

@ -427,10 +427,14 @@ String *Swig_cfunction_call(const_String_or_char_ptr name, ParmList *parms) {
String *rcaststr = SwigType_rcaststr(rpt, pname);
if (comma) {
Printv(func, ",", rcaststr, NIL);
} else {
Append(func, rcaststr);
Append(func, ",");
}
if (cparse_cplusplus && SwigType_type(rpt) == T_USER)
Printv(func, "SWIG_STD_MOVE(", rcaststr, ")", NIL);
else
Printv(func, rcaststr, NIL);
Delete(rpt);
Delete(pname);
Delete(rcaststr);