summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--cli_ure/source/native/native_share.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/cli_ure/source/native/native_share.h b/cli_ure/source/native/native_share.h
index 3c37f6c4f6bb..700577fff666 100644
--- a/cli_ure/source/native/native_share.h
+++ b/cli_ure/source/native/native_share.h
@@ -62,7 +62,7 @@ inline ::System::Object ^ to_cli(
intptr_t intptr =
reinterpret_cast< intptr_t >(
mapping.mapInterface( x.get(), ::getCppuType( &x ) ) );
- ::System::Runtime::InteropServices::GCHandle ^ handle = (::System::Runtime::InteropServices::GCHandle ^)(gcnew ::System::IntPtr(intptr));
+ ::System::Runtime::InteropServices::GCHandle ^ handle = ::System::Runtime::InteropServices::GCHandle::FromIntPtr(gcnew ::System::IntPtr(intptr));
::System::Object ^ ret = handle->Target;
handle->Free();
return ret;