diff options
Diffstat (limited to 'bridges/source/jni_uno/jni_data.cxx')
-rw-r--r-- | bridges/source/jni_uno/jni_data.cxx | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/bridges/source/jni_uno/jni_data.cxx b/bridges/source/jni_uno/jni_data.cxx index 60254849897d..81a1ca383161 100644 --- a/bridges/source/jni_uno/jni_data.cxx +++ b/bridges/source/jni_uno/jni_data.cxx @@ -20,10 +20,10 @@ #include <sal/config.h> #include <cassert> +#include <memory> #include "jni_bridge.h" -#include "o3tl/heap_ptr.hxx" #include "rtl/strbuf.hxx" #include "uno/sequence2.h" @@ -35,7 +35,7 @@ namespace jni_uno inline rtl_mem * seq_allocate( sal_Int32 nElements, sal_Int32 nSize ) { - o3tl::heap_ptr< rtl_mem > seq( + std::unique_ptr< rtl_mem > seq( rtl_mem::allocate( SAL_SEQUENCE_HEADER_SIZE + (nElements * nSize) ) ); uno_Sequence * p = (uno_Sequence *)seq.get(); p->nRefCount = 1; @@ -127,7 +127,7 @@ void createDefaultUnoValue( case typelib_TypeClass_SEQUENCE: { - o3tl::heap_ptr< rtl_mem > seq(seq_allocate(0, 0)); + std::unique_ptr< rtl_mem > seq(seq_allocate(0, 0)); if (assign) { uno_type_destructData(uno_data, type, 0); } @@ -561,7 +561,7 @@ void Bridge::map_to_uno( } else { - o3tl::heap_ptr< rtl_mem > mem( + std::unique_ptr< rtl_mem > mem( rtl_mem::allocate( sizeof (sal_Int64) ) ); *(jlong *) mem.get() = jni->CallLongMethodA( java_data.l, m_jni_info->m_method_Long_longValue, 0 ); @@ -579,7 +579,7 @@ void Bridge::map_to_uno( } else { - o3tl::heap_ptr< rtl_mem > mem( + std::unique_ptr< rtl_mem > mem( rtl_mem::allocate( sizeof (float) ) ); *(jfloat *) mem.get() = jni->CallFloatMethodA( java_data.l, m_jni_info->m_method_Float_floatValue, 0 ); @@ -599,7 +599,7 @@ void Bridge::map_to_uno( } else { - o3tl::heap_ptr< rtl_mem > mem( + std::unique_ptr< rtl_mem > mem( rtl_mem::allocate( sizeof (double) ) ); *(jdouble *) mem.get() = jni->CallDoubleMethodA( @@ -630,7 +630,7 @@ void Bridge::map_to_uno( case typelib_TypeClass_STRUCT: case typelib_TypeClass_EXCEPTION: { - o3tl::heap_ptr< rtl_mem > mem( + std::unique_ptr< rtl_mem > mem( rtl_mem::allocate( value_td.get()->nSize ) ); map_to_uno( jni, mem.get(), java_data, value_td.get()->pWeakRef, 0, @@ -972,7 +972,7 @@ void Bridge::map_to_uno( typelib_TypeDescriptionReference * element_type = ((typelib_IndirectTypeDescription *)td.get())->pType; - o3tl::heap_ptr< rtl_mem > seq; + std::unique_ptr< rtl_mem > seq; sal_Int32 nElements = jni->GetArrayLength( (jarray) java_data.l ); switch (element_type->eTypeClass) |