diff options
author | Noel Grandin <noel@peralex.com> | 2014-05-14 09:58:40 +0200 |
---|---|---|
committer | Noel Grandin <noelgrandin@gmail.com> | 2014-05-14 08:10:22 +0000 |
commit | 248145f99e95cc30bb6231a8e5ea4e294f147040 (patch) | |
tree | c3b5c1e226cc631cde530f2cfb7df2d46f00b8c9 /basctl | |
parent | 671eb12dee290607ed66f3b325f28e7bd4695cba (diff) |
Find places where uno::Sequence is passed by value.
Implement a clang plugin to find them, and clean up existing code
to pass them by reference.
Change-Id: If642d87407c73346d9c0164b9fc77c5c3c4354b8
Reviewed-on: https://gerrit.libreoffice.org/9351
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
Tested-by: Noel Grandin <noelgrandin@gmail.com>
Diffstat (limited to 'basctl')
-rw-r--r-- | basctl/source/basicide/baside3.cxx | 2 | ||||
-rw-r--r-- | basctl/source/basicide/localizationmgr.cxx | 4 | ||||
-rw-r--r-- | basctl/source/inc/localizationmgr.hxx | 8 |
3 files changed, 7 insertions, 7 deletions
diff --git a/basctl/source/basicide/baside3.cxx b/basctl/source/basicide/baside3.cxx index 878dad9f43c4..470219c5aba6 100644 --- a/basctl/source/basicide/baside3.cxx +++ b/basctl/source/basicide/baside3.cxx @@ -867,7 +867,7 @@ extern bool localesAreEqual( const ::com::sun::star::lang::Locale& rLocaleLeft, const ::com::sun::star::lang::Locale& rLocaleRight ); std::vector< lang::Locale > implGetLanguagesOnlyContainedInFirstSeq - ( Sequence< lang::Locale > aFirstSeq, Sequence< lang::Locale > aSecondSeq ) + ( const Sequence< lang::Locale >& aFirstSeq, const Sequence< lang::Locale >& aSecondSeq ) { std::vector< lang::Locale > avRet; diff --git a/basctl/source/basicide/localizationmgr.cxx b/basctl/source/basicide/localizationmgr.cxx index 2c5efb23d962..c34ac55a60a5 100644 --- a/basctl/source/basicide/localizationmgr.cxx +++ b/basctl/source/basicide/localizationmgr.cxx @@ -646,7 +646,7 @@ sal_Int32 LocalizationMgr::implHandleControlResourceProperties } -void LocalizationMgr::handleAddLocales( Sequence< Locale > aLocaleSeq ) +void LocalizationMgr::handleAddLocales( const Sequence< Locale >& aLocaleSeq ) { const Locale* pLocales = aLocaleSeq.getConstArray(); sal_Int32 nLocaleCount = aLocaleSeq.getLength(); @@ -678,7 +678,7 @@ void LocalizationMgr::handleAddLocales( Sequence< Locale > aLocaleSeq ) } -void LocalizationMgr::handleRemoveLocales( Sequence< Locale > aLocaleSeq ) +void LocalizationMgr::handleRemoveLocales( const Sequence< Locale >& aLocaleSeq ) { const Locale* pLocales = aLocaleSeq.getConstArray(); sal_Int32 nLocaleCount = aLocaleSeq.getLength(); diff --git a/basctl/source/inc/localizationmgr.hxx b/basctl/source/inc/localizationmgr.hxx index f6a33ff4ab7a..a23c6c8486cd 100644 --- a/basctl/source/inc/localizationmgr.hxx +++ b/basctl/source/inc/localizationmgr.hxx @@ -82,11 +82,11 @@ public: void handleTranslationbar( void ); - void handleAddLocales( ::com::sun::star::uno::Sequence - < ::com::sun::star::lang::Locale > aLocaleSeq ); + void handleAddLocales( const ::com::sun::star::uno::Sequence + < ::com::sun::star::lang::Locale >& aLocaleSeq ); - void handleRemoveLocales( ::com::sun::star::uno::Sequence - < ::com::sun::star::lang::Locale > aLocaleSeq ); + void handleRemoveLocales( const ::com::sun::star::uno::Sequence + < ::com::sun::star::lang::Locale >& aLocaleSeq ); void handleSetDefaultLocale( ::com::sun::star::lang::Locale aLocale ); |