From 319442a8c4fe9d3bb3ce1f4a6fa45e4da2e7f88e Mon Sep 17 00:00:00 2001 From: William S Fulton Date: Mon, 4 Jul 2022 08:40:04 +0100 Subject: 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. --- Lib/csharp/boost_intrusive_ptr.i | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'Lib/csharp/boost_intrusive_ptr.i') 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) %{ -- cgit v1.2.1