summaryrefslogtreecommitdiff
path: root/Lib/csharp/boost_intrusive_ptr.i
diff options
context:
space:
mode:
authorWilliam S Fulton <wsf@fultondesigns.co.uk>2022-07-04 08:40:04 +0100
committerWilliam S Fulton <wsf@fultondesigns.co.uk>2022-07-04 11:19:50 +0100
commit319442a8c4fe9d3bb3ce1f4a6fa45e4da2e7f88e (patch)
tree4896078f6afda40028967569eb8caacb50679dc2 /Lib/csharp/boost_intrusive_ptr.i
parent71cd6a38fe539a89dc2ee159c6d54017fd4e90a0 (diff)
downloadswig-319442a8c4fe9d3bb3ce1f4a6fa45e4da2e7f88e.tar.gz
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.
Diffstat (limited to 'Lib/csharp/boost_intrusive_ptr.i')
-rw-r--r--Lib/csharp/boost_intrusive_ptr.i4
1 files changed, 2 insertions, 2 deletions
diff --git a/Lib/csharp/boost_intrusive_ptr.i b/Lib/csharp/boost_intrusive_ptr.i
index fa3f53a20..355a910cf 100644
--- a/Lib/csharp/boost_intrusive_ptr.i
+++ b/Lib/csharp/boost_intrusive_ptr.i
@@ -32,7 +32,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 >());
%}
@@ -372,7 +372,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) %{