summaryrefslogtreecommitdiff
path: root/vcl/android
diff options
context:
space:
mode:
authorJan-Marek Glogowski <glogow@fbihome.de>2022-01-13 21:04:19 +0100
committerJan-Marek Glogowski <glogow@fbihome.de>2022-01-14 16:13:04 +0100
commit7d990aafdc363b2a12b5db78637d7f3bef7780bd (patch)
tree3d32337824b6003769318510822110ba09351b9d /vcl/android
parent4bdf28b404f90236d93ce207671f755a71f28496 (diff)
VCL drop m_pInstance from *nix SalData
AKA the "*nix SalData untangling" commit. The original plan was to get rid of vcl/inc/saldatabasic.hxx and even SalData for all the *nix backends. But after many backs and forths, reinspecting the code and imagining the resulting code, I decided against that plan. All these variants would have resulted in reinterpret_cast calls, I wanted to prevent. And they would have required larger renames for no benefit. An other, related idea was to include all SalData implementations in the vcl/inc/svdata.hxx header, but that seemed like an include explosion, so was also dropped. I tried to untangling iOS from using GenericUnixSalData, as it doesn't use any of it's features. The new, minimal SalData should be sufficient. I'm leaving the easier drop of mpInstance from the Windows and MacOSX backend as a minimal interesting EasyHack. Change-Id: I5be01c1f42131a7e31cb30899392308e1e2de53b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/128402 Tested-by: Jenkins Reviewed-by: Jan-Marek Glogowski <glogow@fbihome.de>
Diffstat (limited to 'vcl/android')
-rw-r--r--vcl/android/androidinst.cxx7
1 files changed, 2 insertions, 5 deletions
diff --git a/vcl/android/androidinst.cxx b/vcl/android/androidinst.cxx
index 73760c460be5..8e83dae0a8dd 100644
--- a/vcl/android/androidinst.cxx
+++ b/vcl/android/androidinst.cxx
@@ -36,10 +36,7 @@ AndroidSalInstance *AndroidSalInstance::getInstance()
{
if (!ImplGetSVData())
return NULL;
- SvpSalData *pData = static_cast<SvpSalData *>(ImplGetSVData()->mpSalData);
- if (!pData)
- return NULL;
- return static_cast<AndroidSalInstance *>(pData->m_pInstance);
+ return static_cast<AndroidSalInstance *>(GetSalInstance());
}
AndroidSalInstance::AndroidSalInstance( std::unique_ptr<SalYieldMutex> pMutex )
@@ -161,7 +158,7 @@ extern "C" SalInstance *create_SalInstance()
{
LOGI("Android: CreateSalInstance!");
AndroidSalInstance* pInstance = new AndroidSalInstance( std::make_unique<SvpSalYieldMutex>() );
- new SvpSalData(pInstance);
+ new SvpSalData();
return pInstance;
}