diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2021-08-31 08:22:30 +0200 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2021-08-31 09:16:54 +0200 |
commit | a36d1308f946d890fcdf7887169f284704e4a5bf (patch) | |
tree | 497b4848031970337b50e8ef9b0077d1caeffc9e /cppu/source | |
parent | 4b64d6ac2a186a68f5360d31ae21aefcceb84d12 (diff) |
Elide class makeOIdPart
...which is no longer needed since 00f257a7ef4f1ec52887bc379c14757e057e94c8
"rtl::Static -> thread-safe static local"
Change-Id: Ie78154c5d8b6ad8278405d1ce56c76997e0478d5
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/121347
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
Diffstat (limited to 'cppu/source')
-rw-r--r-- | cppu/source/uno/lbenv.cxx | 23 |
1 files changed, 7 insertions, 16 deletions
diff --git a/cppu/source/uno/lbenv.cxx b/cppu/source/uno/lbenv.cxx index ad61cee0cf67..f018cde00cfd 100644 --- a/cppu/source/uno/lbenv.cxx +++ b/cppu/source/uno/lbenv.cxx @@ -786,13 +786,10 @@ extern "C" void SAL_CALL uno_dumpEnvironmentByName( namespace { - class makeOIdPart - { - private: - OUString m_sOidPart; - public: - makeOIdPart() - { + +const OUString & unoenv_getStaticOIdPart() +{ + static auto const theStaticOIdPart = [] { OUStringBuffer aRet( 64 ); aRet.append( "];" ); // pid @@ -814,15 +811,9 @@ namespace for (unsigned char i : ar) aRet.append( static_cast<sal_Int32>(i), 16 ); - m_sOidPart = aRet.makeStringAndClear(); - } - const OUString& getOIdPart() const { return m_sOidPart; } - }; - -const OUString & unoenv_getStaticOIdPart() -{ - static makeOIdPart theStaticOIdPart; - return theStaticOIdPart.getOIdPart(); + return aRet.makeStringAndClear(); + }(); + return theStaticOIdPart; } } |