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/doc | |
parent | 5dc811daf9ea03dfccabec3a80a44bd12fa62d66 (diff) |
loplugin:redundantcast: const_cast to same type
Change-Id: I7cb919140539d0d573b5fbf786a6041843c2388a
Diffstat (limited to 'sw/source/core/doc')
-rw-r--r-- | sw/source/core/doc/docdesc.cxx | 4 | ||||
-rw-r--r-- | sw/source/core/doc/docftn.cxx | 4 |
2 files changed, 4 insertions, 4 deletions
diff --git a/sw/source/core/doc/docdesc.cxx b/sw/source/core/doc/docdesc.cxx index 6a00e2ee4cff..1583090703d0 100644 --- a/sw/source/core/doc/docdesc.cxx +++ b/sw/source/core/doc/docdesc.cxx @@ -823,7 +823,7 @@ static SwPageDesc* lcl_FindPageDesc( SwPageDescs *pPageDescs, SwPageDesc* res = NULL; if( it != pPageDescs->end() ) { - res = const_cast <SwPageDesc *>( &( *it ) );; + res = &( *it ) ;; if( pPos ) *pPos = std::distance( pPageDescs->begin(), it ); } @@ -856,7 +856,7 @@ bool SwDoc::ContainsPageDesc( const SwPageDesc *pDesc, size_t* pPos ) if (pDesc == NULL) return false; SwPageDesc *res = lcl_FindPageDesc<CompareSwPageDescToPtr>( - const_cast <SwPageDescs *>( &maPageDescs ), pPos, + &maPageDescs, pPos, CompareSwPageDescToPtr(pDesc) ); return res != NULL; } diff --git a/sw/source/core/doc/docftn.cxx b/sw/source/core/doc/docftn.cxx index b89ae65d0110..5d6c51c156a0 100644 --- a/sw/source/core/doc/docftn.cxx +++ b/sw/source/core/doc/docftn.cxx @@ -47,12 +47,12 @@ SwEndNoteInfo& SwEndNoteInfo::operator=(const SwEndNoteInfo& rInfo) if ( rInfo.aPageDescDep.GetRegisteredIn() ) const_cast<SwModify*>(rInfo.aPageDescDep.GetRegisteredIn())->Add( &aPageDescDep ); else if ( aPageDescDep.GetRegisteredIn() ) - const_cast<SwModify*>(aPageDescDep.GetRegisteredIn())->Remove( &aPageDescDep ); + aPageDescDep.GetRegisteredIn()->Remove( &aPageDescDep ); if ( rInfo.aCharFormatDep.GetRegisteredIn() ) const_cast<SwModify*>(rInfo.aCharFormatDep.GetRegisteredIn())->Add( &aCharFormatDep ); else if ( aCharFormatDep.GetRegisteredIn() ) - const_cast<SwModify*>(aCharFormatDep.GetRegisteredIn())->Remove( &aCharFormatDep ); + aCharFormatDep.GetRegisteredIn()->Remove( &aCharFormatDep ); if ( rInfo.aAnchorCharFormatDep.GetRegisteredIn() ) const_cast<SwModify*>(rInfo.aAnchorCharFormatDep.GetRegisteredIn())->Add( |