From b7c260aee331474d993bf96a72bf31f5af350ef3 Mon Sep 17 00:00:00 2001 From: Noel Grandin Date: Mon, 13 Jun 2022 13:13:05 +0200 Subject: clang-tidy modernize-pass-by-value in chart2 Change-Id: I73ae444487571fb61a02a2c813c060d269d52a02 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/135723 Tested-by: Jenkins Reviewed-by: Noel Grandin --- chart2/source/model/template/ChartTypeManager.cxx | 5 +++-- chart2/source/model/template/ChartTypeTemplate.cxx | 5 +++-- 2 files changed, 6 insertions(+), 4 deletions(-) (limited to 'chart2/source/model/template') diff --git a/chart2/source/model/template/ChartTypeManager.cxx b/chart2/source/model/template/ChartTypeManager.cxx index b1abde3522f5..bc6c2fb75ac4 100644 --- a/chart2/source/model/template/ChartTypeManager.cxx +++ b/chart2/source/model/template/ChartTypeManager.cxx @@ -39,6 +39,7 @@ #include #include #include +#include using namespace ::com::sun::star; @@ -212,8 +213,8 @@ namespace chart ChartTypeManager::ChartTypeManager( uno::Reference< - uno::XComponentContext > const & xContext ) : - m_xContext( xContext ) + uno::XComponentContext > xContext ) : + m_xContext(std::move( xContext )) {} ChartTypeManager::~ChartTypeManager() diff --git a/chart2/source/model/template/ChartTypeTemplate.cxx b/chart2/source/model/template/ChartTypeTemplate.cxx index bc27bea1e162..42c110b94917 100644 --- a/chart2/source/model/template/ChartTypeTemplate.cxx +++ b/chart2/source/model/template/ChartTypeTemplate.cxx @@ -42,6 +42,7 @@ #include #include +#include using namespace ::com::sun::star; using namespace ::com::sun::star::chart2; @@ -126,9 +127,9 @@ namespace chart ChartTypeTemplate::ChartTypeTemplate( Reference< uno::XComponentContext > const & xContext, - const OUString & rServiceName ) : + OUString aServiceName ) : m_xContext( xContext ), - m_aServiceName( rServiceName ) + m_aServiceName(std::move( aServiceName )) { } -- cgit