[Libreoffice-commits] core.git: configmgr/source
Libreoffice Gerrit user
logerrit at kemper.freedesktop.org
Wed Jan 16 08:20:48 UTC 2019
configmgr/source/components.cxx | 12 ++----------
1 file changed, 2 insertions(+), 10 deletions(-)
New commits:
commit 939d744cee18642fec24d33436b211c92b8b46f8
Author: Stephan Bergmann <sbergman at redhat.com>
AuthorDate: Tue Jan 15 19:05:35 2019 +0100
Commit: Stephan Bergmann <sbergman at redhat.com>
CommitDate: Wed Jan 16 09:20:26 2019 +0100
Replace uses of rtl/instance.hxx with plain local static vars in configmgr
Change-Id: Iebd72f1cfd2b3af54efaabba04a89d043eef28c8
Reviewed-on: https://gerrit.libreoffice.org/66405
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman at redhat.com>
diff --git a/configmgr/source/components.cxx b/configmgr/source/components.cxx
index e584a3c98589..9587fde1e7a5 100644
--- a/configmgr/source/components.cxx
+++ b/configmgr/source/components.cxx
@@ -48,7 +48,6 @@
#include <rtl/ref.hxx>
#include <rtl/ustrbuf.hxx>
#include <rtl/ustring.hxx>
-#include <rtl/instance.hxx>
#include <sal/log.hxx>
#include <sal/types.h>
#include <salhelper/thread.hxx>
@@ -196,19 +195,12 @@ void Components::WriteThread::execute() {
reference_->clear();
}
-class theComponentsSingleton :
- public rtl::StaticWithArg<
- Components,
- css::uno::Reference< css::uno::XComponentContext >,
- theComponentsSingleton>
-{
-};
-
Components & Components::getSingleton(
css::uno::Reference< css::uno::XComponentContext > const & context)
{
assert(context.is());
- return theComponentsSingleton::get(context);
+ static Components singleton(context);
+ return singleton;
}
bool Components::allLocales(OUString const & locale) {
More information about the Libreoffice-commits
mailing list