summaryrefslogtreecommitdiff
path: root/stoc/source
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2017-09-04 08:53:38 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2017-09-04 10:52:41 +0200
commit7aa7f4d9e4294959748bccf9e763154740251635 (patch)
tree79fc3855ce0cc1141abdda514df374cd42ab259c /stoc/source
parent6f511a5de909b2fb6cb42b851e0cc90f54fbdd59 (diff)
loplugin:unnecessaryparen include c++ casts
Change-Id: I132d3c66f0562e2c37a02eaf4c168d06c2b473eb Reviewed-on: https://gerrit.libreoffice.org/41874 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'stoc/source')
-rw-r--r--stoc/source/corereflection/criface.cxx4
-rw-r--r--stoc/source/defaultregistry/defaultregistry.cxx6
-rw-r--r--stoc/source/invocation/invocation.cxx26
3 files changed, 18 insertions, 18 deletions
diff --git a/stoc/source/corereflection/criface.cxx b/stoc/source/corereflection/criface.cxx
index d5a3a2192d60..680e55083dd4 100644
--- a/stoc/source/corereflection/criface.cxx
+++ b/stoc/source/corereflection/criface.cxx
@@ -219,13 +219,13 @@ void IdlAttributeFieldImpl::set( Any & rObj, const Any & rValue )
bool bAssign;
if (pTD->eTypeClass == typelib_TypeClass_ANY)
{
- uno_copyAndConvertData( pArg, (const_cast< Any * >(&rValue)),
+ uno_copyAndConvertData( pArg, const_cast< Any * >(&rValue),
pTD, getReflection()->getCpp2Uno().get() );
bAssign = true;
}
else if (typelib_typedescriptionreference_equals( rValue.getValueTypeRef(), pTD->pWeakRef ))
{
- uno_copyAndConvertData( pArg, (const_cast< void * >(rValue.getValue()) ),
+ uno_copyAndConvertData( pArg, const_cast< void * >(rValue.getValue()),
pTD, getReflection()->getCpp2Uno().get() );
bAssign = true;
}
diff --git a/stoc/source/defaultregistry/defaultregistry.cxx b/stoc/source/defaultregistry/defaultregistry.cxx
index db3e7666c1ba..fb54149dc27d 100644
--- a/stoc/source/defaultregistry/defaultregistry.cxx
+++ b/stoc/source/defaultregistry/defaultregistry.cxx
@@ -678,7 +678,7 @@ Reference< XRegistryKey > SAL_CALL NestedKeyImpl::createKey( const OUString& aKe
m_state = m_xRegistry->m_state++;
- return (static_cast<XRegistryKey*>(new NestedKeyImpl(m_xRegistry.get(), localKey, defaultKey)));
+ return static_cast<XRegistryKey*>(new NestedKeyImpl(m_xRegistry.get(), localKey, defaultKey));
}
}
else
@@ -698,7 +698,7 @@ Reference< XRegistryKey > SAL_CALL NestedKeyImpl::createKey( const OUString& aKe
m_state = m_xRegistry->m_state++;
- return (static_cast<XRegistryKey*>(new NestedKeyImpl(m_xRegistry.get(), localKey, defaultKey)));
+ return static_cast<XRegistryKey*>(new NestedKeyImpl(m_xRegistry.get(), localKey, defaultKey));
}
}
}
@@ -1237,7 +1237,7 @@ Reference< XRegistryKey > SAL_CALL NestedRegistryImpl::getRootKey( )
defaultKey = m_defaultReg->getRootKey();
}
- return (static_cast<XRegistryKey*>(new NestedKeyImpl(this, localKey, defaultKey)));
+ return static_cast<XRegistryKey*>(new NestedKeyImpl(this, localKey, defaultKey));
}
}
else
diff --git a/stoc/source/invocation/invocation.cxx b/stoc/source/invocation/invocation.cxx
index 64dc24f9dfb1..355da85b9bed 100644
--- a/stoc/source/invocation/invocation.cxx
+++ b/stoc/source/invocation/invocation.cxx
@@ -236,9 +236,9 @@ Any SAL_CALL Invocation_Impl::queryInterface( const Type & aType )
{
// PropertySet implementation
Any a = ::cppu::queryInterface( aType,
- (static_cast< XInvocation* >(this)),
- (static_cast< XMaterialHolder* >(this)),
- (static_cast< XTypeProvider * >(this)) );
+ static_cast< XInvocation* >(this),
+ static_cast< XMaterialHolder* >(this),
+ static_cast< XTypeProvider * >(this) );
if( a.hasValue() )
{
return a;
@@ -251,50 +251,50 @@ Any SAL_CALL Invocation_Impl::queryInterface( const Type & aType )
if ((_xDirect.is() && _xENDirect.is()) ||
(!_xDirect.is() && _xENIntrospection.is()))
{
- return makeAny( Reference< XExactName >( (static_cast< XExactName* >(this)) ) );
+ return makeAny( Reference< XExactName >( static_cast< XExactName* >(this) ) );
}
}
else if ( aType == cppu::UnoType<XNameContainer>::get())
{
if( _xNameContainer.is() )
- return makeAny( Reference< XNameContainer >( (static_cast< XNameContainer* >(this)) ) );
+ return makeAny( Reference< XNameContainer >( static_cast< XNameContainer* >(this) ) );
}
else if ( aType == cppu::UnoType<XNameReplace>::get())
{
if( _xNameReplace.is() )
- return makeAny( Reference< XNameReplace >( (static_cast< XNameReplace* >(this)) ) );
+ return makeAny( Reference< XNameReplace >( static_cast< XNameReplace* >(this) ) );
}
else if ( aType == cppu::UnoType<XNameAccess>::get())
{
if( _xNameAccess.is() )
- return makeAny( Reference< XNameAccess >( (static_cast< XNameAccess* >(this)) ) );
+ return makeAny( Reference< XNameAccess >( static_cast< XNameAccess* >(this) ) );
}
else if ( aType == cppu::UnoType<XIndexContainer>::get())
{
if (_xIndexContainer.is())
- return makeAny( Reference< XIndexContainer >( (static_cast< XIndexContainer* >(this)) ) );
+ return makeAny( Reference< XIndexContainer >( static_cast< XIndexContainer* >(this) ) );
}
else if ( aType == cppu::UnoType<XIndexReplace>::get())
{
if (_xIndexReplace.is())
- return makeAny( Reference< XIndexReplace >( (static_cast< XIndexReplace* >(this)) ) );
+ return makeAny( Reference< XIndexReplace >( static_cast< XIndexReplace* >(this) ) );
}
else if ( aType == cppu::UnoType<XIndexAccess>::get())
{
if (_xIndexAccess.is())
- return makeAny( Reference< XIndexAccess >( (static_cast< XIndexAccess* >(this)) ) );
+ return makeAny( Reference< XIndexAccess >( static_cast< XIndexAccess* >(this) ) );
}
else if ( aType == cppu::UnoType<XEnumerationAccess>::get())
{
if (_xEnumerationAccess.is())
- return makeAny( Reference< XEnumerationAccess >( (static_cast< XEnumerationAccess* >(this)) ) );
+ return makeAny( Reference< XEnumerationAccess >( static_cast< XEnumerationAccess* >(this) ) );
}
else if ( aType == cppu::UnoType<XElementAccess>::get())
{
if (_xElementAccess.is())
{
return makeAny( Reference< XElementAccess >(
- (static_cast< XElementAccess* >((static_cast< XNameContainer* >(this))) ) ) );
+ static_cast< XElementAccess* >(static_cast< XNameContainer* >(this)) ) );
}
}
else if ( aType == cppu::UnoType<XInvocation2>::get())
@@ -304,7 +304,7 @@ Any SAL_CALL Invocation_Impl::queryInterface( const Type & aType )
if ( ( _xDirect.is() && _xDirect2.is()) ||
(!_xDirect.is() && _xIntrospectionAccess.is() ) )
{
- return makeAny( Reference< XInvocation2 >( (static_cast< XInvocation2* >(this)) ) );
+ return makeAny( Reference< XInvocation2 >( static_cast< XInvocation2* >(this) ) );
}
}