More move semantics improvements
More removal of casts in the out typemaps when copying objects to enable C++ compilers to possibly make use of move semantics.
This commit is contained in:
parent
71cd6a38fe
commit
319442a8c4
13 changed files with 22 additions and 22 deletions
|
|
@ -33,7 +33,7 @@
|
|||
%}
|
||||
%typemap(out, fragment="SWIG_intrusive_deleter") CONST TYPE %{
|
||||
//plain value(out)
|
||||
$1_ltype* resultp = new $1_ltype(($1_ltype &)$1);
|
||||
$1_ltype* resultp = new $1_ltype($1);
|
||||
intrusive_ptr_add_ref(resultp);
|
||||
*(SWIG_SHARED_PTR_QNAMESPACE::shared_ptr< CONST TYPE > **)&$result = new SWIG_SHARED_PTR_QNAMESPACE::shared_ptr< CONST TYPE >(resultp, SWIG_intrusive_deleter< CONST TYPE >());
|
||||
%}
|
||||
|
|
@ -342,7 +342,7 @@
|
|||
}
|
||||
$1 = *argp; %}
|
||||
%typemap(out) CONST TYPE
|
||||
%{ *(SWIG_SHARED_PTR_QNAMESPACE::shared_ptr< CONST TYPE > **)&$result = new SWIG_SHARED_PTR_QNAMESPACE::shared_ptr< CONST TYPE >(new $1_ltype(($1_ltype &)$1)); %}
|
||||
%{ *(SWIG_SHARED_PTR_QNAMESPACE::shared_ptr< CONST TYPE > **)&$result = new SWIG_SHARED_PTR_QNAMESPACE::shared_ptr< CONST TYPE >(new $1_ltype($1)); %}
|
||||
|
||||
// plain pointer
|
||||
%typemap(in) CONST TYPE * (SWIG_SHARED_PTR_QNAMESPACE::shared_ptr< CONST TYPE > *smartarg = 0) %{
|
||||
|
|
|
|||
|
|
@ -29,7 +29,7 @@
|
|||
}
|
||||
$1 = *argp; %}
|
||||
%typemap(out) CONST TYPE
|
||||
%{ *(SWIG_SHARED_PTR_QNAMESPACE::shared_ptr< CONST TYPE > **)&$result = new SWIG_SHARED_PTR_QNAMESPACE::shared_ptr< CONST TYPE >(new $1_ltype(($1_ltype &)$1)); %}
|
||||
%{ *(SWIG_SHARED_PTR_QNAMESPACE::shared_ptr< CONST TYPE > **)&$result = new SWIG_SHARED_PTR_QNAMESPACE::shared_ptr< CONST TYPE >(new $1_ltype($1)); %}
|
||||
|
||||
%typemap(directorin,descriptor="L$packagepath/$&javaclassname;") CONST TYPE
|
||||
%{ $input = 0;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue