summaryrefslogtreecommitdiff
path: root/comphelper
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2016-04-08 15:54:34 +0200
committerNoel Grandin <noelgrandin@gmail.com>2016-04-11 06:20:32 +0000
commitf3a43c723eaf751d5ee28b13c0cc6f8014094bbe (patch)
tree8756af2a2975ea58c2214fdfcbf0e9c393cf5b27 /comphelper
parentf3dabe7507b578484805255eae31d8a1358e605c (diff)
clang-tidy performance-unnecessary-value-param in comphelper
Change-Id: Iff26c89ea6079e0f12691dbc04bb36f02b85c305 Reviewed-on: https://gerrit.libreoffice.org/23920 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
Diffstat (limited to 'comphelper')
-rw-r--r--comphelper/source/container/namecontainer.cxx2
-rw-r--r--comphelper/source/misc/configurationhelper.cxx6
-rw-r--r--comphelper/source/misc/dispatchcommand.cxx2
-rw-r--r--comphelper/source/property/opropertybag.cxx2
-rw-r--r--comphelper/source/property/propertybag.cxx2
5 files changed, 7 insertions, 7 deletions
diff --git a/comphelper/source/container/namecontainer.cxx b/comphelper/source/container/namecontainer.cxx
index b04ada10cf08..6ef8143753f9 100644
--- a/comphelper/source/container/namecontainer.cxx
+++ b/comphelper/source/container/namecontainer.cxx
@@ -187,7 +187,7 @@ Type SAL_CALL NameContainer::getElementType()
return maType;
}
-Reference< XNameContainer > comphelper::NameContainer_createInstance( Type aType )
+Reference< XNameContainer > comphelper::NameContainer_createInstance( const Type& aType )
{
return static_cast<XNameContainer*>(new NameContainer( aType ));
}
diff --git a/comphelper/source/misc/configurationhelper.cxx b/comphelper/source/misc/configurationhelper.cxx
index f5eb95ec4dfe..3da81093224f 100644
--- a/comphelper/source/misc/configurationhelper.cxx
+++ b/comphelper/source/misc/configurationhelper.cxx
@@ -76,7 +76,7 @@ css::uno::Reference< css::uno::XInterface > ConfigurationHelper::openConfig(cons
}
-css::uno::Any ConfigurationHelper::readRelativeKey(const css::uno::Reference< css::uno::XInterface > xCFG ,
+css::uno::Any ConfigurationHelper::readRelativeKey(const css::uno::Reference< css::uno::XInterface >& xCFG ,
const OUString& sRelPath,
const OUString& sKey )
{
@@ -98,7 +98,7 @@ css::uno::Any ConfigurationHelper::readRelativeKey(const css::uno::Reference< cs
}
-void ConfigurationHelper::writeRelativeKey(const css::uno::Reference< css::uno::XInterface > xCFG ,
+void ConfigurationHelper::writeRelativeKey(const css::uno::Reference< css::uno::XInterface >& xCFG ,
const OUString& sRelPath,
const OUString& sKey ,
const css::uno::Any& aValue )
@@ -121,7 +121,7 @@ void ConfigurationHelper::writeRelativeKey(const css::uno::Reference< css::uno::
}
-css::uno::Reference< css::uno::XInterface > ConfigurationHelper::makeSureSetNodeExists(const css::uno::Reference< css::uno::XInterface > xCFG ,
+css::uno::Reference< css::uno::XInterface > ConfigurationHelper::makeSureSetNodeExists(const css::uno::Reference< css::uno::XInterface >& xCFG ,
const OUString& sRelPathToSet,
const OUString& sSetNode )
{
diff --git a/comphelper/source/misc/dispatchcommand.cxx b/comphelper/source/misc/dispatchcommand.cxx
index 04cc2d78c73c..6b97eef89430 100644
--- a/comphelper/source/misc/dispatchcommand.cxx
+++ b/comphelper/source/misc/dispatchcommand.cxx
@@ -31,7 +31,7 @@ using namespace css;
namespace comphelper {
-bool dispatchCommand(const OUString& rCommand, const css::uno::Sequence<css::beans::PropertyValue>& rArguments, uno::Reference<css::frame::XDispatchResultListener> aListener)
+bool dispatchCommand(const OUString& rCommand, const css::uno::Sequence<css::beans::PropertyValue>& rArguments, const uno::Reference<css::frame::XDispatchResultListener>& aListener)
{
// Target where we will execute the .uno: command
uno::Reference<uno::XComponentContext> xContext = ::comphelper::getProcessComponentContext();
diff --git a/comphelper/source/property/opropertybag.cxx b/comphelper/source/property/opropertybag.cxx
index 20fc6f0544d1..651c72c2a2e3 100644
--- a/comphelper/source/property/opropertybag.cxx
+++ b/comphelper/source/property/opropertybag.cxx
@@ -343,7 +343,7 @@ namespace comphelper
// check whether the type is allowed, everything else will be checked
// by m_aDynamicProperties
- Type aPropertyType = _rInitialValue.getValueType();
+ const Type& aPropertyType = _rInitialValue.getValueType();
if ( _rInitialValue.hasValue()
&& !m_aAllowedTypes.empty()
&& m_aAllowedTypes.find( aPropertyType ) == m_aAllowedTypes.end()
diff --git a/comphelper/source/property/propertybag.cxx b/comphelper/source/property/propertybag.cxx
index a3d22c04085f..7f32dd970fb0 100644
--- a/comphelper/source/property/propertybag.cxx
+++ b/comphelper/source/property/propertybag.cxx
@@ -130,7 +130,7 @@ namespace comphelper
void PropertyBag::addProperty( const OUString& _rName, sal_Int32 _nHandle, sal_Int32 _nAttributes, const Any& _rInitialValue )
{
// check type sanity
- Type aPropertyType = _rInitialValue.getValueType();
+ const Type& aPropertyType = _rInitialValue.getValueType();
if ( aPropertyType.getTypeClass() == TypeClass_VOID )
throw IllegalTypeException(
"The initial value must be non-NULL to determine the property type.",