diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2018-11-22 13:12:17 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2018-11-22 18:54:21 +0100 |
commit | 170df072a612456ec83143dff0174a2e376afcba (patch) | |
tree | 2761d280b41b103679650a47f85dcc111395343d /toolkit/source/controls/unocontrolcontainermodel.cxx | |
parent | c5b920dc889410ef5c4baf0adf7fc57ff0d2f123 (diff) |
improve function-local statics in toolkit
Change-Id: I2a134d1cc74eaeaad46f4249fadd215b2391ba19
Reviewed-on: https://gerrit.libreoffice.org/63789
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'toolkit/source/controls/unocontrolcontainermodel.cxx')
-rw-r--r-- | toolkit/source/controls/unocontrolcontainermodel.cxx | 11 |
1 files changed, 2 insertions, 9 deletions
diff --git a/toolkit/source/controls/unocontrolcontainermodel.cxx b/toolkit/source/controls/unocontrolcontainermodel.cxx index d7ded7950c2f..162173157b29 100644 --- a/toolkit/source/controls/unocontrolcontainermodel.cxx +++ b/toolkit/source/controls/unocontrolcontainermodel.cxx @@ -79,15 +79,8 @@ css::uno::Reference< css::beans::XPropertySetInfo > UnoControlContainerModel::ge ::cppu::IPropertyArrayHelper& UnoControlContainerModel::getInfoHelper() { - ::osl::Guard< ::osl::Mutex > aGuard( GetMutex() ); - - static UnoPropertyArrayHelper* pHelper = nullptr; - if ( !pHelper ) - { - css::uno::Sequence<sal_Int32> aIDs = ImplGetPropertyIds(); - pHelper = new UnoPropertyArrayHelper( aIDs ); - } - return *pHelper; + static UnoPropertyArrayHelper aHelper( ImplGetPropertyIds() ); + return aHelper; } extern "C" SAL_DLLPUBLIC_EXPORT css::uno::XInterface * |