diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2022-06-03 14:13:33 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2022-06-03 18:32:32 +0200 |
commit | 5a6b4b4f288621772991269180aa3a2cffff01af (patch) | |
tree | 8f29ed7593c8e54dc62a1ffcc41f3570eb984064 /svl/source/numbers | |
parent | f0b7b388ae06d95007b69812bcf844ac9bed15c4 (diff) |
clang-tidy modernize-pass-by-value in svl
Change-Id: I184efd7aee2c3eb02399100a4a7500951255d423
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/135357
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'svl/source/numbers')
-rw-r--r-- | svl/source/numbers/numfmuno.cxx | 13 | ||||
-rw-r--r-- | svl/source/numbers/numfmuno.hxx | 6 | ||||
-rw-r--r-- | svl/source/numbers/supservs.cxx | 5 | ||||
-rw-r--r-- | svl/source/numbers/supservs.hxx | 2 |
4 files changed, 14 insertions, 12 deletions
diff --git a/svl/source/numbers/numfmuno.cxx b/svl/source/numbers/numfmuno.cxx index a17a71a81947..98ead86e432d 100644 --- a/svl/source/numbers/numfmuno.cxx +++ b/svl/source/numbers/numfmuno.cxx @@ -36,6 +36,7 @@ #include <svl/zforlist.hxx> #include <svl/zformat.hxx> #include <svl/itemprop.hxx> +#include <utility> using namespace com::sun::star; @@ -344,9 +345,9 @@ uno::Sequence<OUString> SAL_CALL SvNumberFormatterServiceObj::getSupportedServic return { "com.sun.star.util.NumberFormatter" }; } -SvNumberFormatsObj::SvNumberFormatsObj( SvNumberFormatsSupplierObj& _rParent, ::comphelper::SharedMutex const & _rMutex ) +SvNumberFormatsObj::SvNumberFormatsObj( SvNumberFormatsSupplierObj& _rParent, ::comphelper::SharedMutex _aMutex ) :m_xSupplier( &_rParent ) - ,m_aMutex( _rMutex ) + ,m_aMutex(std::move( _aMutex )) { } @@ -584,10 +585,10 @@ uno::Sequence<OUString> SAL_CALL SvNumberFormatsObj::getSupportedServiceNames() return { "com.sun.star.util.NumberFormats" }; } -SvNumberFormatObj::SvNumberFormatObj( SvNumberFormatsSupplierObj& rParent, sal_uLong nK, const ::comphelper::SharedMutex& _rMutex ) +SvNumberFormatObj::SvNumberFormatObj( SvNumberFormatsSupplierObj& rParent, sal_uLong nK, ::comphelper::SharedMutex _aMutex ) :m_xSupplier( &rParent ) ,nKey( nK ) - ,m_aMutex( _rMutex ) + ,m_aMutex(std::move( _aMutex )) { } @@ -794,9 +795,9 @@ uno::Sequence<OUString> SAL_CALL SvNumberFormatObj::getSupportedServiceNames() return { "com.sun.star.util.NumberFormatProperties" }; } -SvNumberFormatSettingsObj::SvNumberFormatSettingsObj( SvNumberFormatsSupplierObj& rParent, const ::comphelper::SharedMutex& _rMutex ) +SvNumberFormatSettingsObj::SvNumberFormatSettingsObj( SvNumberFormatsSupplierObj& rParent, ::comphelper::SharedMutex _aMutex ) :m_xSupplier( &rParent ) - ,m_aMutex( _rMutex ) + ,m_aMutex(std::move( _aMutex )) { } diff --git a/svl/source/numbers/numfmuno.hxx b/svl/source/numbers/numfmuno.hxx index fbd7889ce8cd..f88c2e6429af 100644 --- a/svl/source/numbers/numfmuno.hxx +++ b/svl/source/numbers/numfmuno.hxx @@ -90,7 +90,7 @@ private: mutable ::comphelper::SharedMutex m_aMutex; public: - SvNumberFormatsObj(SvNumberFormatsSupplierObj& pParent, ::comphelper::SharedMutex const & _rMutex); + SvNumberFormatsObj(SvNumberFormatsSupplierObj& pParent, ::comphelper::SharedMutex _aMutex); virtual ~SvNumberFormatsObj() override; @@ -140,7 +140,7 @@ private: mutable ::comphelper::SharedMutex m_aMutex; public: - SvNumberFormatObj( SvNumberFormatsSupplierObj& rParent, sal_uLong nK, const ::comphelper::SharedMutex& _rMutex ); + SvNumberFormatObj( SvNumberFormatsSupplierObj& rParent, sal_uLong nK, ::comphelper::SharedMutex _aMutex ); virtual ~SvNumberFormatObj() override; // XPropertySet @@ -186,7 +186,7 @@ private: mutable ::comphelper::SharedMutex m_aMutex; public: - SvNumberFormatSettingsObj( SvNumberFormatsSupplierObj& rParent, const ::comphelper::SharedMutex& _rMutex); + SvNumberFormatSettingsObj( SvNumberFormatsSupplierObj& rParent, ::comphelper::SharedMutex _aMutex); virtual ~SvNumberFormatSettingsObj() override; diff --git a/svl/source/numbers/supservs.cxx b/svl/source/numbers/supservs.cxx index 165e67829feb..5a51158a2beb 100644 --- a/svl/source/numbers/supservs.cxx +++ b/svl/source/numbers/supservs.cxx @@ -27,6 +27,7 @@ #include <svl/numformat.hxx> #include <tools/debug.hxx> #include <osl/mutex.hxx> +#include <utility> #include <osl/diagnose.h> using namespace ::com::sun::star::uno; @@ -36,8 +37,8 @@ using namespace ::com::sun::star::util; using namespace ::utl; -SvNumberFormatsSupplierServiceObject::SvNumberFormatsSupplierServiceObject(const css::uno::Reference< css::uno::XComponentContext >& _rxORB) - :m_xORB(_rxORB) +SvNumberFormatsSupplierServiceObject::SvNumberFormatsSupplierServiceObject(css::uno::Reference< css::uno::XComponentContext > _xORB) + :m_xORB(std::move(_xORB)) { } diff --git a/svl/source/numbers/supservs.hxx b/svl/source/numbers/supservs.hxx index 5baf8f055bc3..4ddf5751e84a 100644 --- a/svl/source/numbers/supservs.hxx +++ b/svl/source/numbers/supservs.hxx @@ -44,7 +44,7 @@ class SvNumberFormatsSupplierServiceObject final void implEnsureFormatter(); public: - explicit SvNumberFormatsSupplierServiceObject(const css::uno::Reference< css::uno::XComponentContext >& _rxORB); + explicit SvNumberFormatsSupplierServiceObject(css::uno::Reference< css::uno::XComponentContext > _xORB); virtual ~SvNumberFormatsSupplierServiceObject() override; // XInterface |