From 0f01b42e73af0e0baa57a353554a53d936c4f5e2 Mon Sep 17 00:00:00 2001 From: Noel Grandin Date: Mon, 13 Jun 2022 15:48:35 +0200 Subject: clang-tidy modernize-pass-by-value in connectivity Change-Id: I1f1b609254c7f8cfba14c248167f81b51684d8e8 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/135727 Tested-by: Jenkins Reviewed-by: Noel Grandin --- connectivity/source/inc/file/FDriver.hxx | 2 +- connectivity/source/inc/file/FResultSetMetaData.hxx | 2 +- connectivity/source/inc/file/fcode.hxx | 5 +++-- connectivity/source/inc/file/fcomp.hxx | 3 ++- 4 files changed, 7 insertions(+), 5 deletions(-) (limited to 'connectivity/source/inc/file') diff --git a/connectivity/source/inc/file/FDriver.hxx b/connectivity/source/inc/file/FDriver.hxx index 9d289d618a3d..0351c59ca27a 100644 --- a/connectivity/source/inc/file/FDriver.hxx +++ b/connectivity/source/inc/file/FDriver.hxx @@ -42,7 +42,7 @@ namespace connectivity::file // for this Driver css::uno::Reference< css::uno::XComponentContext > m_xContext; public: - OFileDriver(const css::uno::Reference< css::uno::XComponentContext >& _rxContext); + OFileDriver(css::uno::Reference< css::uno::XComponentContext > _xContext); // OComponentHelper virtual void SAL_CALL disposing() override; diff --git a/connectivity/source/inc/file/FResultSetMetaData.hxx b/connectivity/source/inc/file/FResultSetMetaData.hxx index 65fc0bb3c83e..dee656a915f4 100644 --- a/connectivity/source/inc/file/FResultSetMetaData.hxx +++ b/connectivity/source/inc/file/FResultSetMetaData.hxx @@ -46,7 +46,7 @@ namespace connectivity::file virtual ~OResultSetMetaData() override; public: // a Constructor, that is needed for when Returning the Object is needed: - OResultSetMetaData(const ::rtl::Reference& _rxColumns,const OUString& _aTableName,OFileTable* _pTable); + OResultSetMetaData(::rtl::Reference _xColumns, OUString _aTableName, OFileTable* _pTable); virtual sal_Int32 SAL_CALL getColumnCount( ) override; virtual sal_Bool SAL_CALL isAutoIncrement( sal_Int32 column ) override; diff --git a/connectivity/source/inc/file/fcode.hxx b/connectivity/source/inc/file/fcode.hxx index c78461743c27..daadbf880f5a 100644 --- a/connectivity/source/inc/file/fcode.hxx +++ b/connectivity/source/inc/file/fcode.hxx @@ -25,6 +25,7 @@ #include #include +#include namespace connectivity { @@ -107,9 +108,9 @@ namespace connectivity protected: OOperandValue(){} - OOperandValue(const ORowSetValue& _rVar, sal_Int32 eDbType) + OOperandValue(ORowSetValue _aVar, sal_Int32 eDbType) : OOperand(eDbType) - , m_aValue(_rVar) + , m_aValue(std::move(_aVar)) {} OOperandValue(sal_Int32 eDbType) :OOperand(eDbType){} diff --git a/connectivity/source/inc/file/fcomp.hxx b/connectivity/source/inc/file/fcomp.hxx index ebdb0679e452..72afcdb0a84e 100644 --- a/connectivity/source/inc/file/fcomp.hxx +++ b/connectivity/source/inc/file/fcomp.hxx @@ -19,6 +19,7 @@ #pragma once #include +#include namespace connectivity { @@ -86,7 +87,7 @@ namespace connectivity ::rtl::Reference m_rCompiler; public: - OPredicateInterpreter(const ::rtl::Reference& rComp) : m_rCompiler(rComp){} + OPredicateInterpreter(::rtl::Reference xComp) : m_rCompiler(std::move(xComp)){} virtual ~OPredicateInterpreter() override; bool evaluate(OCodeList& rCodeList); -- cgit