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( throw WrappedTargetRuntimeException(
"ODatabaseForm::getName", "ODatabaseForm::getName",
*const_cast< ODatabaseForm* >( this ), *this,
::cppu::getCaughtException() ::cppu::getCaughtException()
); );
} }

View File

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

View File

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

View File

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