From e7dbef922a2fc73469f12c520bcc1af54fe038fb Mon Sep 17 00:00:00 2001 From: Noel Grandin Date: Thu, 23 Mar 2023 11:11:48 +0200 Subject: rtl::Static to thread-safe-static Change-Id: Ife02e6d2be3ebfbb08522ab0183ef4aa31a99e19 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/149415 Tested-by: Jenkins Reviewed-by: Noel Grandin --- scripting/source/provider/ActiveMSPList.cxx | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'scripting') diff --git a/scripting/source/provider/ActiveMSPList.cxx b/scripting/source/provider/ActiveMSPList.cxx index 4333f78ae3e1..fbd2b2b05331 100644 --- a/scripting/source/provider/ActiveMSPList.cxx +++ b/scripting/source/provider/ActiveMSPList.cxx @@ -67,12 +67,10 @@ public: namespace { - //thread-safe double-locked class to ensure createNonDocMSPs is called once - class theNonDocMSPCreator : public rtl::StaticWithArg {}; - + //thread-safe method to ensure createNonDocMSPs is called once void ensureNonDocMSPs(ActiveMSPList *pList) { - theNonDocMSPCreator::get(pList); + static NonDocMSPCreator theCreator(pList); } } -- cgit