diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2022-05-26 10:46:16 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2022-05-26 18:30:04 +0200 |
commit | 3cde7345199b535763bb7d83a87096e9157b7317 (patch) | |
tree | 53cb59e83ee7855764dabf317bd2c10bd7952013 /i18npool | |
parent | b566a5f5cef881c858d14d434df2b82b6d07d687 (diff) |
clang-tidy modernize-pass-by-value in i18npool
Change-Id: I96d99fbdce2b0432676acec8b327cece7c39bcb7
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/134983
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'i18npool')
-rw-r--r-- | i18npool/inc/breakiteratorImpl.hxx | 3 | ||||
-rw-r--r-- | i18npool/inc/calendarImpl.hxx | 5 | ||||
-rw-r--r-- | i18npool/inc/cclass_unicode.hxx | 2 | ||||
-rw-r--r-- | i18npool/inc/characterclassificationImpl.hxx | 7 | ||||
-rw-r--r-- | i18npool/inc/collatorImpl.hxx | 5 | ||||
-rw-r--r-- | i18npool/inc/inputsequencechecker.hxx | 5 | ||||
-rw-r--r-- | i18npool/inc/textconversionImpl.hxx | 3 | ||||
-rw-r--r-- | i18npool/source/characterclassification/cclass_unicode.cxx | 5 | ||||
-rw-r--r-- | i18npool/source/localedata/LocaleNode.cxx | 5 | ||||
-rw-r--r-- | i18npool/source/localedata/LocaleNode.hxx | 2 |
10 files changed, 25 insertions, 17 deletions
diff --git a/i18npool/inc/breakiteratorImpl.hxx b/i18npool/inc/breakiteratorImpl.hxx index c27645a60ef2..a2700b7a9bf9 100644 --- a/i18npool/inc/breakiteratorImpl.hxx +++ b/i18npool/inc/breakiteratorImpl.hxx @@ -22,6 +22,7 @@ #include <com/sun/star/i18n/XBreakIterator.hpp> #include <cppuhelper/implbase.hxx> +#include <utility> #include <vector> namespace com::sun::star::uno { class XComponentContext; } @@ -103,7 +104,7 @@ protected: private: struct lookupTableItem { - lookupTableItem(const css::lang::Locale& _aLocale, css::uno::Reference < XBreakIterator > const & _xBI) : aLocale(_aLocale), xBI(_xBI) {}; + lookupTableItem(css::lang::Locale _aLocale, css::uno::Reference < XBreakIterator > _xBI) : aLocale(std::move(_aLocale)), xBI(std::move(_xBI)) {}; css::lang::Locale aLocale; css::uno::Reference < XBreakIterator > xBI; }; diff --git a/i18npool/inc/calendarImpl.hxx b/i18npool/inc/calendarImpl.hxx index 4d90ed0ef2be..0580a878535e 100644 --- a/i18npool/inc/calendarImpl.hxx +++ b/i18npool/inc/calendarImpl.hxx @@ -21,6 +21,7 @@ #include <com/sun/star/i18n/XCalendar4.hpp> #include <cppuhelper/implbase.hxx> #include <com/sun/star/lang/XServiceInfo.hpp> +#include <utility> #include <vector> namespace com::sun::star::uno { class XComponentContext; } @@ -92,8 +93,8 @@ public: private: struct lookupTableItem { - lookupTableItem(const OUString& rCacheID, css::uno::Reference < css::i18n::XCalendar4 > const & _xCalendar) - : m_aCacheID(rCacheID), xCalendar(_xCalendar) {} + lookupTableItem(OUString aCacheID, css::uno::Reference < css::i18n::XCalendar4 > _xCalendar) + : m_aCacheID(std::move(aCacheID)), xCalendar(std::move(_xCalendar)) {} OUString m_aCacheID; css::uno::Reference < css::i18n::XCalendar4 > xCalendar; }; diff --git a/i18npool/inc/cclass_unicode.hxx b/i18npool/inc/cclass_unicode.hxx index a10fe84eb8d9..03c03d5bbc97 100644 --- a/i18npool/inc/cclass_unicode.hxx +++ b/i18npool/inc/cclass_unicode.hxx @@ -64,7 +64,7 @@ namespace i18npool { class cclass_Unicode final : public cppu::WeakImplHelper < css::i18n::XCharacterClassification, css::lang::XServiceInfo > { public: - cclass_Unicode(const css::uno::Reference < css::uno::XComponentContext >& rxContext ); + cclass_Unicode(css::uno::Reference < css::uno::XComponentContext > xContext ); virtual ~cclass_Unicode() override; virtual OUString SAL_CALL toUpper( const OUString& Text, sal_Int32 nPos, sal_Int32 nCount, diff --git a/i18npool/inc/characterclassificationImpl.hxx b/i18npool/inc/characterclassificationImpl.hxx index 6ae8dee6c572..bcfc7836a92f 100644 --- a/i18npool/inc/characterclassificationImpl.hxx +++ b/i18npool/inc/characterclassificationImpl.hxx @@ -20,6 +20,7 @@ #include <com/sun/star/i18n/XCharacterClassification.hpp> #include <cppuhelper/implbase.hxx> +#include <utility> #include <vector> #include <optional> #include <com/sun/star/lang/XServiceInfo.hpp> @@ -68,9 +69,9 @@ public: private: struct lookupTableItem { - lookupTableItem(const css::lang::Locale& rLocale, const OUString& rName, - css::uno::Reference < XCharacterClassification > const & rxCI) : - aLocale(rLocale), aName(rName), xCI(rxCI) {}; + lookupTableItem(css::lang::Locale _aLocale, OUString _aName, + css::uno::Reference < XCharacterClassification > _xCI) : + aLocale(std::move(_aLocale)), aName(std::move(_aName)), xCI(std::move(_xCI)) {}; css::lang::Locale aLocale; OUString aName; css::uno::Reference < XCharacterClassification > xCI; diff --git a/i18npool/inc/collatorImpl.hxx b/i18npool/inc/collatorImpl.hxx index 061333d84df9..4d2eee6b7fa9 100644 --- a/i18npool/inc/collatorImpl.hxx +++ b/i18npool/inc/collatorImpl.hxx @@ -24,6 +24,7 @@ #include <cppuhelper/implbase.hxx> #include <com/sun/star/lang/XServiceInfo.hpp> +#include <utility> #include <vector> #include <optional> @@ -79,8 +80,8 @@ private: OUString algorithm; OUString service; css::uno::Reference < XCollator > xC; - lookupTableItem(const css::lang::Locale& rLocale, const OUString& _algorithm, const OUString& _service, - css::uno::Reference < XCollator > const & _xC) : aLocale(rLocale), algorithm(_algorithm), service(_service), xC(_xC) {} + lookupTableItem(css::lang::Locale _aLocale, OUString _algorithm, OUString _service, + css::uno::Reference < XCollator > _xC) : aLocale(std::move(_aLocale)), algorithm(std::move(_algorithm)), service(std::move(_service)), xC(std::move(_xC)) {} bool equals(const css::lang::Locale& rLocale, std::u16string_view _algorithm) { return aLocale.Language == rLocale.Language && aLocale.Country == rLocale.Country && diff --git a/i18npool/inc/inputsequencechecker.hxx b/i18npool/inc/inputsequencechecker.hxx index 037b4f37a3a4..4f93ada08201 100644 --- a/i18npool/inc/inputsequencechecker.hxx +++ b/i18npool/inc/inputsequencechecker.hxx @@ -22,6 +22,7 @@ #include <com/sun/star/lang/XServiceInfo.hpp> #include <com/sun/star/i18n/XExtendedInputSequenceChecker.hpp> +#include <utility> #include <vector> #include <optional> @@ -57,8 +58,8 @@ private: const char *serviceName; struct lookupTableItem { - lookupTableItem(const char* rLanguage, const css::uno::Reference < css::i18n::XExtendedInputSequenceChecker >& rxISC) : - aLanguage(rLanguage), xISC(rxISC) {} + lookupTableItem(const char* rLanguage, css::uno::Reference < css::i18n::XExtendedInputSequenceChecker > _xISC) : + aLanguage(rLanguage), xISC(std::move(_xISC)) {} const char* aLanguage; css::uno::Reference < css::i18n::XExtendedInputSequenceChecker > xISC; }; diff --git a/i18npool/inc/textconversionImpl.hxx b/i18npool/inc/textconversionImpl.hxx index 29a049cca785..f1502b619bf0 100644 --- a/i18npool/inc/textconversionImpl.hxx +++ b/i18npool/inc/textconversionImpl.hxx @@ -21,6 +21,7 @@ #include <com/sun/star/lang/XServiceInfo.hpp> #include <com/sun/star/i18n/XExtendedTextConversion.hpp> #include <cppuhelper/implbase.hxx> +#include <utility> namespace com::sun::star::uno { class XComponentContext; } @@ -35,7 +36,7 @@ class TextConversionImpl final : public cppu::WeakImplHelper > { public: - TextConversionImpl( const css::uno::Reference < css::uno::XComponentContext >& rxContext ) : m_xContext(rxContext) {}; + TextConversionImpl( css::uno::Reference < css::uno::XComponentContext > xContext ) : m_xContext(std::move(xContext)) {}; // Methods css::i18n::TextConversionResult SAL_CALL diff --git a/i18npool/source/characterclassification/cclass_unicode.cxx b/i18npool/source/characterclassification/cclass_unicode.cxx index 6c44d0f517fe..f07e9f812951 100644 --- a/i18npool/source/characterclassification/cclass_unicode.cxx +++ b/i18npool/source/characterclassification/cclass_unicode.cxx @@ -27,6 +27,7 @@ #include <breakiteratorImpl.hxx> #include <transliteration_body.hxx> #include <rtl/ref.hxx> +#include <utility> using namespace ::com::sun::star; using namespace ::com::sun::star::uno; @@ -38,11 +39,11 @@ namespace i18npool { // class cclass_Unicode // ----------------------------------------------------; -cclass_Unicode::cclass_Unicode( const uno::Reference < XComponentContext >& rxContext ) : +cclass_Unicode::cclass_Unicode( uno::Reference < XComponentContext > xContext ) : transToUpper( new Transliteration_casemapping() ), transToLower( new Transliteration_casemapping() ), transToTitle( new Transliteration_casemapping() ), - m_xContext( rxContext ), + m_xContext(std::move( xContext )), nStartTypes( 0 ), nContTypes( 0 ), cGroupSep( ',' ), diff --git a/i18npool/source/localedata/LocaleNode.cxx b/i18npool/source/localedata/LocaleNode.cxx index 721f710151da..c20edbfb58e9 100644 --- a/i18npool/source/localedata/LocaleNode.cxx +++ b/i18npool/source/localedata/LocaleNode.cxx @@ -21,6 +21,7 @@ #include <string.h> #include <algorithm> #include <memory> +#include <utility> #include <vector> #include <map> #include <o3tl/sorted_vector.hxx> @@ -42,8 +43,8 @@ typedef ::o3tl::sorted_vector< sal_Int16 > ValueSet; namespace cssi = ::com::sun::star::i18n; -LocaleNode::LocaleNode (const OUString& name, const Reference< XAttributeList > & attr) - : aName(name) +LocaleNode::LocaleNode (OUString name, const Reference< XAttributeList > & attr) + : aName(std::move(name)) , aAttribs(attr) , parent(nullptr) , nError(0) diff --git a/i18npool/source/localedata/LocaleNode.hxx b/i18npool/source/localedata/LocaleNode.hxx index f49b01d796f5..c8911aadef2d 100644 --- a/i18npool/source/localedata/LocaleNode.hxx +++ b/i18npool/source/localedata/LocaleNode.hxx @@ -85,7 +85,7 @@ protected: mutable int nError; public: - LocaleNode (const OUString& name, const Reference< XAttributeList > & attr); + LocaleNode (OUString name, const Reference< XAttributeList > & attr); void setValue(std::u16string_view oValue) { aValue += oValue; }; const OUString& getName() const { return aName; }; const OUString& getValue() const { return aValue; }; |