[Libreoffice-commits] core.git: vcl/android vcl/inc
Libreoffice Gerrit user
logerrit at kemper.freedesktop.org
Wed Aug 22 07:20:40 UTC 2018
vcl/android/androidinst.cxx | 7 ++++---
vcl/inc/android/androidinst.hxx | 2 +-
2 files changed, 5 insertions(+), 4 deletions(-)
New commits:
commit c658fd4609c05617c785870b00aa3a0998375cc6
Author: Noel Grandin <noel.grandin at collabora.co.uk>
AuthorDate: Wed Aug 22 09:19:06 2018 +0200
Commit: Noel Grandin <noel.grandin at collabora.co.uk>
CommitDate: Wed Aug 22 09:19:59 2018 +0200
fix android build
after
commit f05f4e042ca6ac8ae7f1d1e8e6bfb4cbba17a044
Date: Sun Aug 19 08:53:29 2018 +0200
loplugin:useuniqueptr in SvpSalInstance
Change-Id: I0479139c28b88c049a4584c825a28217fa20b7c0
diff --git a/vcl/android/androidinst.cxx b/vcl/android/androidinst.cxx
index 8946ff330b38..42830ef66dbf 100644
--- a/vcl/android/androidinst.cxx
+++ b/vcl/android/androidinst.cxx
@@ -17,6 +17,7 @@
#include <headless/svpdummies.hxx>
#include <unx/gendata.hxx>
#include <osl/detail/android-bootstrap.h>
+#include <o3tl/make_unique.hxx>
#include <rtl/strbuf.hxx>
#include <vcl/settings.hxx>
#include <vcl/svapp.hxx>
@@ -54,8 +55,8 @@ AndroidSalInstance *AndroidSalInstance::getInstance()
return static_cast<AndroidSalInstance *>(pData->m_pInstance);
}
-AndroidSalInstance::AndroidSalInstance( SalYieldMutex *pMutex )
- : SvpSalInstance( pMutex )
+AndroidSalInstance::AndroidSalInstance( std::unique_ptr<SalYieldMutex> pMutex )
+ : SvpSalInstance( std::move(pMutex) )
{
int res = (lo_get_javavm())->AttachCurrentThread(&m_pJNIEnv, NULL);
LOGI("AttachCurrentThread res=%d env=%p", res, m_pJNIEnv);
@@ -191,7 +192,7 @@ SalData::~SalData()
SalInstance *CreateSalInstance()
{
LOGI("Android: CreateSalInstance!");
- AndroidSalInstance* pInstance = new AndroidSalInstance( new SvpSalYieldMutex() );
+ AndroidSalInstance* pInstance = new AndroidSalInstance( o3tl::make_unique<SvpSalYieldMutex>() );
new AndroidSalData( pInstance );
pInstance->AcquireYieldMutex();
return pInstance;
diff --git a/vcl/inc/android/androidinst.hxx b/vcl/inc/android/androidinst.hxx
index 30673ac8bd72..49758f3efd70 100644
--- a/vcl/inc/android/androidinst.hxx
+++ b/vcl/inc/android/androidinst.hxx
@@ -25,7 +25,7 @@ class AndroidSalInstance : public SvpSalInstance
JNIEnv *m_pJNIEnv;
public:
- AndroidSalInstance( SalYieldMutex *pMutex );
+ AndroidSalInstance( std::unique_ptr<SalYieldMutex> pMutex );
virtual ~AndroidSalInstance();
static AndroidSalInstance *getInstance();
More information about the Libreoffice-commits
mailing list