diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2021-07-30 20:54:50 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2021-07-31 08:55:29 +0200 |
commit | a943936eeff04b60ebd0b2552bc18b42606f3321 (patch) | |
tree | e3a20ebf81feaa0914e9e5b9a0fe008e0ea61c2e /package/source/xstor | |
parent | 620f9649ae55e01700419876ce25ab4e45ed859f (diff) |
rtl::Static -> static local
in a handful cases, like a map or a vector, we don't need init on demand
at all, the default constructor can be laid out at compile time
Change-Id: Ifa3188af7a65cd475ce0f603d15a8c26bcda7e6d
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/119710
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'package/source/xstor')
-rw-r--r-- | package/source/xstor/owriteablestream.cxx | 6 | ||||
-rw-r--r-- | package/source/xstor/xstorage.cxx | 6 |
2 files changed, 4 insertions, 8 deletions
diff --git a/package/source/xstor/owriteablestream.cxx b/package/source/xstor/owriteablestream.cxx index 5dd673f29171..1b13d49c79db 100644 --- a/package/source/xstor/owriteablestream.cxx +++ b/package/source/xstor/owriteablestream.cxx @@ -48,7 +48,6 @@ #include <comphelper/sequence.hxx> #include <rtl/digest.h> -#include <rtl/instance.hxx> #include <tools/diagnose_ex.h> #include <PackageConstants.hxx> @@ -1930,11 +1929,10 @@ uno::Sequence< uno::Type > SAL_CALL OWriteStream::getTypes() return m_pData->m_pTypeCollection->getTypes() ; } -namespace { struct lcl_ImplId : public rtl::Static< ::cppu::OImplementationId, lcl_ImplId > {}; } - uno::Sequence< sal_Int8 > SAL_CALL OWriteStream::getImplementationId() { - return css::uno::Sequence<sal_Int8>(); + static ::cppu::OImplementationId lcl_ImplId; + return lcl_ImplId.getImplementationId(); } sal_Int32 SAL_CALL OWriteStream::readBytes( uno::Sequence< sal_Int8 >& aData, sal_Int32 nBytesToRead ) diff --git a/package/source/xstor/xstorage.cxx b/package/source/xstor/xstorage.cxx index 24849a6c9062..f7e86b4234ad 100644 --- a/package/source/xstor/xstorage.cxx +++ b/package/source/xstor/xstorage.cxx @@ -53,7 +53,6 @@ #include <cppuhelper/queryinterface.hxx> #include <cppuhelper/typeprovider.hxx> #include <cppuhelper/exc_hlp.hxx> -#include <rtl/instance.hxx> #include <comphelper/storagehelper.hxx> #include <comphelper/ofopxmlhelper.hxx> @@ -2174,11 +2173,10 @@ uno::Sequence< uno::Type > SAL_CALL OStorage::getTypes() return m_pData->m_pTypeCollection->getTypes() ; } -namespace { struct lcl_ImplId : public rtl::Static< ::cppu::OImplementationId, lcl_ImplId > {}; } - uno::Sequence< sal_Int8 > SAL_CALL OStorage::getImplementationId() { - return css::uno::Sequence<sal_Int8>(); + static ::cppu::OImplementationId lcl_ImplId; + return lcl_ImplId.getImplementationId(); } // XStorage |