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>
This commit is contained in:
Noel Grandin
2016-04-08 15:54:34 +02:00
committed by Noel Grandin
parent f3dabe7507
commit f3a43c723e
8 changed files with 12 additions and 12 deletions

View File

@@ -187,7 +187,7 @@ Type SAL_CALL NameContainer::getElementType()
return maType; return maType;
} }
Reference< XNameContainer > comphelper::NameContainer_createInstance( Type aType ) Reference< XNameContainer > comphelper::NameContainer_createInstance( const Type& aType )
{ {
return static_cast<XNameContainer*>(new NameContainer( aType )); return static_cast<XNameContainer*>(new NameContainer( aType ));
} }

View File

@@ -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& sRelPath,
const OUString& sKey ) 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& sRelPath,
const OUString& sKey , const OUString& sKey ,
const css::uno::Any& aValue ) 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& sRelPathToSet,
const OUString& sSetNode ) const OUString& sSetNode )
{ {

View File

@@ -31,7 +31,7 @@ using namespace css;
namespace comphelper { 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 // Target where we will execute the .uno: command
uno::Reference<uno::XComponentContext> xContext = ::comphelper::getProcessComponentContext(); uno::Reference<uno::XComponentContext> xContext = ::comphelper::getProcessComponentContext();

View File

@@ -343,7 +343,7 @@ namespace comphelper
// check whether the type is allowed, everything else will be checked // check whether the type is allowed, everything else will be checked
// by m_aDynamicProperties // by m_aDynamicProperties
Type aPropertyType = _rInitialValue.getValueType(); const Type& aPropertyType = _rInitialValue.getValueType();
if ( _rInitialValue.hasValue() if ( _rInitialValue.hasValue()
&& !m_aAllowedTypes.empty() && !m_aAllowedTypes.empty()
&& m_aAllowedTypes.find( aPropertyType ) == m_aAllowedTypes.end() && m_aAllowedTypes.find( aPropertyType ) == m_aAllowedTypes.end()

View File

@@ -130,7 +130,7 @@ namespace comphelper
void PropertyBag::addProperty( const OUString& _rName, sal_Int32 _nHandle, sal_Int32 _nAttributes, const Any& _rInitialValue ) void PropertyBag::addProperty( const OUString& _rName, sal_Int32 _nHandle, sal_Int32 _nAttributes, const Any& _rInitialValue )
{ {
// check type sanity // check type sanity
Type aPropertyType = _rInitialValue.getValueType(); const Type& aPropertyType = _rInitialValue.getValueType();
if ( aPropertyType.getTypeClass() == TypeClass_VOID ) if ( aPropertyType.getTypeClass() == TypeClass_VOID )
throw IllegalTypeException( throw IllegalTypeException(
"The initial value must be non-NULL to determine the property type.", "The initial value must be non-NULL to determine the property type.",

View File

@@ -120,7 +120,7 @@ public:
* E.g. css::container::NoSuchElementException if the specified * E.g. css::container::NoSuchElementException if the specified
* key does not exists. * key does not exists.
*/ */
static css::uno::Any readRelativeKey(const css::uno::Reference< css::uno::XInterface > xCFG , static css::uno::Any readRelativeKey(const css::uno::Reference< css::uno::XInterface >& xCFG ,
const OUString& sRelPath, const OUString& sRelPath,
const OUString& sKey ); const OUString& sKey );
@@ -150,7 +150,7 @@ public:
* key does not exists or css::uno::Exception if the provided configuration * key does not exists or css::uno::Exception if the provided configuration
* access does not allow writing for this key. * access does not allow writing for this key.
*/ */
static void writeRelativeKey(const css::uno::Reference< css::uno::XInterface > xCFG , static void writeRelativeKey(const css::uno::Reference< css::uno::XInterface >& xCFG ,
const OUString& sRelPath, const OUString& sRelPath,
const OUString& sKey , const OUString& sKey ,
const css::uno::Any& aValue ); const css::uno::Any& aValue );
@@ -184,7 +184,7 @@ public:
* E.g. css::uno::Exception if the provided configuration * E.g. css::uno::Exception if the provided configuration
* access does not allow writing for this set. * access does not allow writing for this set.
*/ */
static css::uno::Reference< css::uno::XInterface > makeSureSetNodeExists(const css::uno::Reference< css::uno::XInterface > xCFG , static css::uno::Reference< css::uno::XInterface > makeSureSetNodeExists(const css::uno::Reference< css::uno::XInterface >& xCFG ,
const OUString& sRelPathToSet, const OUString& sRelPathToSet,
const OUString& sSetNode ); const OUString& sSetNode );

View File

@@ -27,7 +27,7 @@ namespace comphelper
*/ */
COMPHELPER_DLLPUBLIC bool dispatchCommand(const OUString& rCommand, COMPHELPER_DLLPUBLIC bool dispatchCommand(const OUString& rCommand,
const css::uno::Sequence<css::beans::PropertyValue>& rArguments, const css::uno::Sequence<css::beans::PropertyValue>& rArguments,
css::uno::Reference<css::frame::XDispatchResultListener> aListener = css::uno::Reference<css::frame::XDispatchResultListener>()); const css::uno::Reference<css::frame::XDispatchResultListener>& aListener = css::uno::Reference<css::frame::XDispatchResultListener>());
} }

View File

@@ -27,7 +27,7 @@
namespace comphelper namespace comphelper
{ {
COMPHELPER_DLLPUBLIC css::uno::Reference< css::container::XNameContainer > COMPHELPER_DLLPUBLIC css::uno::Reference< css::container::XNameContainer >
NameContainer_createInstance( css::uno::Type aType ); NameContainer_createInstance( const css::uno::Type& aType );
} }
#endif // INCLUDED_COMPHELPER_NAMECONTAINER_HXX #endif // INCLUDED_COMPHELPER_NAMECONTAINER_HXX