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/controlmodelcontainerbase.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/controlmodelcontainerbase.cxx')
-rw-r--r-- | toolkit/source/controls/controlmodelcontainerbase.cxx | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/toolkit/source/controls/controlmodelcontainerbase.cxx b/toolkit/source/controls/controlmodelcontainerbase.cxx index 4d05caa81ff8..514cfccec5b9 100644 --- a/toolkit/source/controls/controlmodelcontainerbase.cxx +++ b/toolkit/source/controls/controlmodelcontainerbase.cxx @@ -233,13 +233,8 @@ Any ControlModelContainerBase::ImplGetDefaultValue( sal_uInt16 nPropId ) const ::cppu::IPropertyArrayHelper& ControlModelContainerBase::getInfoHelper() { - static UnoPropertyArrayHelper* pHelper = nullptr; - if ( !pHelper ) - { - Sequence<sal_Int32> aIDs = ImplGetPropertyIds(); - pHelper = new UnoPropertyArrayHelper( aIDs ); - } - return *pHelper; + static UnoPropertyArrayHelper aHelper( ImplGetPropertyIds() ); + return aHelper; } void SAL_CALL ControlModelContainerBase::dispose( ) |