summaryrefslogtreecommitdiff
path: root/bridges/source/jni_uno
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2018-08-28 09:09:33 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2018-08-29 09:05:39 +0200
commit37f9fdc11c4e95d6a34cb515a454503256a82c63 (patch)
tree35099c65caf4c62451a5b7a7c0bac249473c9733 /bridges/source/jni_uno
parent4c91b89d8ce9c34179f31854dc88bd0a9fa84cba (diff)
replace rtl_allocateMemory with std::malloc
where used directly, since rtl_allocateMemory now just calls into std::malloc Change-Id: I59f85bdb7efdf6baa30e8fcd2370c0f8e9c999ad Reviewed-on: https://gerrit.libreoffice.org/59685 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'bridges/source/jni_uno')
-rw-r--r--bridges/source/jni_uno/jni_base.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/bridges/source/jni_uno/jni_base.h b/bridges/source/jni_uno/jni_base.h
index c7ab58a0078d..6fc2aeb7b447 100644
--- a/bridges/source/jni_uno/jni_base.h
+++ b/bridges/source/jni_uno/jni_base.h
@@ -205,9 +205,9 @@ inline JLocalAutoRef & JLocalAutoRef::operator = ( JLocalAutoRef & auto_ref )
struct rtl_mem
{
static void * operator new ( size_t nSize )
- { return rtl_allocateMemory( nSize ); }
+ { return std::malloc( nSize ); }
static void operator delete ( void * mem )
- { if (mem) rtl_freeMemory( mem ); }
+ { std::free( mem ); }
static void * operator new ( size_t, void * mem )
{ return mem; }
static void operator delete ( void *, void * )
@@ -218,7 +218,7 @@ struct rtl_mem
inline rtl_mem * rtl_mem::allocate( std::size_t bytes )
{
- void * p = rtl_allocateMemory( bytes );
+ void * p = std::malloc( bytes );
if (nullptr == p)
throw BridgeRuntimeError( "out of memory!" );
return static_cast<rtl_mem *>(p);