loplugin:redundantcast: const_cast to same type

Change-Id: I5fe081bc2edfe14c81372ae0fd407e493d80d689
This commit is contained in:
Stephan Bergmann 2015-05-29 12:04:32 +02:00
parent f9a8dd3bbb
commit 3a05a08ba7
4 changed files with 6 additions and 6 deletions

View File

@ -4052,7 +4052,7 @@ OUString SAL_CALL ODatabaseForm::getName() throw( RuntimeException, std::excepti
{
throw WrappedTargetRuntimeException(
"ODatabaseForm::getName",
*const_cast< ODatabaseForm* >( this ),
*this,
::cppu::getCaughtException()
);
}

View File

@ -646,7 +646,7 @@ OUString SAL_CALL OControlModel::getName() throw(RuntimeException, std::exceptio
css::uno::Any a(cppu::getCaughtException());
throw WrappedTargetRuntimeException(
"OControlModel::getName",
*const_cast< OControlModel* >( this ),
*this,
a
);
}
@ -664,7 +664,7 @@ void SAL_CALL OControlModel::setName(const OUString& _rName) throw(RuntimeExcept
css::uno::Any a(cppu::getCaughtException());
throw WrappedTargetRuntimeException(
"OControlModel::setName",
*const_cast< OControlModel* >( this ),
*this,
a
);
}

View File

@ -803,7 +803,7 @@ namespace frm
catch( const SQLException& ) { throw; }
catch( const Exception& )
{
throw WrappedTargetException( OUString(), *const_cast< FormOperations* >( this ), ::cppu::getCaughtException() );
throw WrappedTargetException( OUString(), *this, ::cppu::getCaughtException() );
}
impl_invalidateAllSupportedFeatures_nothrow( aGuard );

View File

@ -51,8 +51,8 @@ template< typename CONCRETE_DATA_TYPE_IMPL, typename SUPERCLASS >
{
if ( !m_bPropertiesRegistered )
{
const_cast< ODerivedDataType* >( this )->registerProperties();
const_cast< ODerivedDataType* >( this )->m_bPropertiesRegistered = true;
this->registerProperties();
m_bPropertiesRegistered = true;
}
return *ODerivedDataType< CONCRETE_DATA_TYPE_IMPL, SUPERCLASS >::getArrayHelper();