loplugin:moveparam in various

Change-Id: I522d03ffdaafcfe364425b4135249492879e3d5b
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/123429
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
This commit is contained in:
Noel Grandin
2021-10-11 21:12:33 +02:00
parent 2c596b694a
commit e4913a56c0
3 changed files with 13 additions and 13 deletions

View File

@@ -131,9 +131,9 @@ struct SvcInfo
const std::vector< LanguageType > aSuppLanguages;
SvcInfo( const OUString &rSvcImplName,
const std::vector< LanguageType > &rSuppLanguages ) :
std::vector< LanguageType >&& rSuppLanguages ) :
aSvcImplName (rSvcImplName),
aSuppLanguages (rSuppLanguages)
aSuppLanguages (std::move(rSuppLanguages))
{
}
@@ -961,7 +961,7 @@ void LngSvcMgr::GetAvailableSpellSvcs_Impl()
uno::Sequence<lang::Locale> aLocaleSequence(xSvc->getLocales());
aLanguages = LocaleSeqToLangVec( aLocaleSequence );
pAvailSpellSvcs->push_back( SvcInfo( aImplName, aLanguages ) );
pAvailSpellSvcs->push_back( SvcInfo( aImplName, std::move(aLanguages) ) );
}
catch (const uno::Exception &)
{
@@ -1019,7 +1019,7 @@ void LngSvcMgr::GetAvailableGrammarSvcs_Impl()
uno::Sequence<lang::Locale> aLocaleSequence(xSvc->getLocales());
aLanguages = LocaleSeqToLangVec( aLocaleSequence );
pAvailGrammarSvcs->push_back( SvcInfo( aImplName, aLanguages ) );
pAvailGrammarSvcs->push_back( SvcInfo( aImplName, std::move(aLanguages) ) );
}
catch (const uno::Exception &)
{
@@ -1071,7 +1071,7 @@ void LngSvcMgr::GetAvailableHyphSvcs_Impl()
SAL_WARN_IF( aImplName.isEmpty(), "linguistic", "empty implementation name" );
uno::Sequence<lang::Locale> aLocaleSequence(xSvc->getLocales());
aLanguages = LocaleSeqToLangVec( aLocaleSequence );
pAvailHyphSvcs->push_back( SvcInfo( aImplName, aLanguages ) );
pAvailHyphSvcs->push_back( SvcInfo( aImplName, std::move(aLanguages) ) );
}
catch (const uno::Exception &)
{
@@ -1125,7 +1125,7 @@ void LngSvcMgr::GetAvailableThesSvcs_Impl()
uno::Sequence<lang::Locale> aLocaleSequence(xSvc->getLocales());
aLanguages = LocaleSeqToLangVec( aLocaleSequence );
pAvailThesSvcs->push_back( SvcInfo( aImplName, aLanguages ) );
pAvailThesSvcs->push_back( SvcInfo( aImplName, std::move(aLanguages) ) );
}
catch (const uno::Exception &)
{

View File

@@ -69,9 +69,9 @@ class InstallLangpack : public Idle
{
std::vector<OUString> m_aPackages;
public:
explicit InstallLangpack(const std::vector<OUString>& rPackages)
explicit InstallLangpack(std::vector<OUString>&& rPackages)
: Idle("install langpack")
, m_aPackages(rPackages)
, m_aPackages(std::move(rPackages))
{
SetPriority(TaskPriority::LOWEST);
}
@@ -151,7 +151,7 @@ OUString getInstalledLocaleForSystemUILanguage(const css::uno::Sequence<OUString
}
if (!aPackages.empty())
{
xLangpackInstaller.reset(new InstallLangpack(aPackages));
xLangpackInstaller.reset(new InstallLangpack(std::move(aPackages)));
xLangpackInstaller->Start();
}
}

View File

@@ -1998,9 +1998,9 @@ struct UnoControlListBoxModel_Data
m_aListItems = i_copySource.m_aListItems;
}
void setAllItems( const ::std::vector< ListItem >& i_rItems )
void setAllItems( ::std::vector< ListItem >&& i_rItems )
{
m_aListItems = i_rItems;
m_aListItems = std::move(i_rItems);
}
void removeItem( const sal_Int32 i_nIndex )
@@ -2130,7 +2130,7 @@ void SAL_CALL UnoControlListBoxModel::setFastPropertyValue_NoBroadcast( sal_Int3
aItems.begin(),
CreateListItem()
);
m_xData->setAllItems( aItems );
m_xData->setAllItems( std::move(aItems) );
// since an XItemListListener does not have a "all items modified" or some such method,
// we simulate this by notifying removal of all items, followed by insertion of all new
@@ -2937,7 +2937,7 @@ void SAL_CALL UnoControlComboBoxModel::setFastPropertyValue_NoBroadcast( sal_Int
aItems.begin(),
CreateListItem()
);
m_xData->setAllItems( aItems );
m_xData->setAllItems( std::move(aItems) );
// since an XItemListListener does not have a "all items modified" or some such method,
// we simulate this by notifying removal of all items, followed by insertion of all new