diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2021-08-13 16:13:42 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2021-08-15 19:17:01 +0200 |
commit | 00f257a7ef4f1ec52887bc379c14757e057e94c8 (patch) | |
tree | 816bf25723911674850987df481919816c627416 /cppuhelper | |
parent | Simplify tools::Rectangle a bit (diff) | |
download | core-00f257a7ef4f1ec52887bc379c14757e057e94c8.tar.gz core-00f257a7ef4f1ec52887bc379c14757e057e94c8.zip |
rtl::Static -> thread-safe static local
Change-Id: Iac0501e6aa35cc3d8e62f6b6e68b76cf70233aae
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/120459
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'cppuhelper')
-rw-r--r-- | cppuhelper/source/macro_expander.cxx | 21 |
1 files changed, 5 insertions, 16 deletions
diff --git a/cppuhelper/source/macro_expander.cxx b/cppuhelper/source/macro_expander.cxx index 85c649dd437c..93f758becc12 100644 --- a/cppuhelper/source/macro_expander.cxx +++ b/cppuhelper/source/macro_expander.cxx @@ -69,21 +69,6 @@ OUString expandMacros(OUString const & text) { namespace { -class ImplNames -{ -private: - Sequence<OUString> m_aNames; -public: - ImplNames() : m_aNames(2) - { - m_aNames[0] = SERVICE_NAME_A; - m_aNames[1] = SERVICE_NAME_B; - } - const Sequence<OUString>& getNames() const { return m_aNames; } -}; - -class theImplNames : public rtl::Static<ImplNames, theImplNames> {}; - OUString s_impl_name() { return IMPL_NAME; @@ -91,7 +76,11 @@ OUString s_impl_name() Sequence< OUString > const & s_get_service_names() { - return theImplNames::get().getNames(); + static const Sequence< OUString > IMPL_NAMES { + SERVICE_NAME_A, + SERVICE_NAME_B + }; + return IMPL_NAMES; } typedef cppu::WeakComponentImplHelper< |