diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2015-05-29 12:05:00 +0200 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2015-05-29 12:05:00 +0200 |
commit | 148953244fc8d741ef84ef777ad566ae80edd28a (patch) | |
tree | 807234f01238659c42e87bd1975e6c091f5e89e0 /sw/source/core/unocore/unofield.cxx | |
parent | 5dc811daf9ea03dfccabec3a80a44bd12fa62d66 (diff) |
loplugin:redundantcast: const_cast to same type
Change-Id: I7cb919140539d0d573b5fbf786a6041843c2388a
Diffstat (limited to 'sw/source/core/unocore/unofield.cxx')
-rw-r--r-- | sw/source/core/unocore/unofield.cxx | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/sw/source/core/unocore/unofield.cxx b/sw/source/core/unocore/unofield.cxx index 852362495522..4d175fb843db 100644 --- a/sw/source/core/unocore/unofield.cxx +++ b/sw/source/core/unocore/unofield.cxx @@ -811,7 +811,7 @@ SwFieldType* SwXFieldMaster::GetFieldType(bool const bDontCreate) const if (m_pImpl->m_bIsDescriptor) return 0; else - return static_cast<SwFieldType*>(const_cast<SwModify*>(m_pImpl->GetRegisteredIn())); + return static_cast<SwFieldType*>(m_pImpl->GetRegisteredIn()); } typedef std::vector<SwFormatField*> SwDependentFields; @@ -1297,8 +1297,8 @@ SwXTextField::getTextFieldMaster() throw (uno::RuntimeException, std::exception) SwFieldType* pType = 0; if (m_pImpl->m_bIsDescriptor && m_pImpl->m_FieldTypeClient.GetRegisteredIn()) { - pType = static_cast<SwFieldType*>(const_cast<SwModify*>( - m_pImpl->m_FieldTypeClient.GetRegisteredIn())); + pType = static_cast<SwFieldType*>( + m_pImpl->m_FieldTypeClient.GetRegisteredIn()); } else { @@ -1995,7 +1995,7 @@ throw (lang::IllegalArgumentException, uno::RuntimeException, std::exception) m_pImpl->m_bIsDescriptor = false; if (m_pImpl->m_FieldTypeClient.GetRegisteredIn()) { - const_cast<SwModify*>(m_pImpl->m_FieldTypeClient.GetRegisteredIn()) + m_pImpl->m_FieldTypeClient.GetRegisteredIn() ->Remove(&m_pImpl->m_FieldTypeClient); } m_pImpl->m_pProps.reset(); |