diff options
author | Bjoern Michaelsen <bjoern.michaelsen@canonical.com> | 2014-12-21 23:05:47 +0100 |
---|---|---|
committer | Bjoern Michaelsen <bjoern.michaelsen@canonical.com> | 2014-12-23 04:02:14 +0100 |
commit | 583c949612ac40c21b02886f4d37a45212946138 (patch) | |
tree | f0ccac68e46719a4492afed75b4ec8c4b84b696f /sw/inc/ndindex.hxx | |
parent | 310eb66522ff30492e8b3cd86dbafaeb52cdff90 (diff) |
c-style cast to const_cast
Change-Id: Ie5d8483305f4ef2d76c291fcb8c707a69ba9cf52
Diffstat (limited to 'sw/inc/ndindex.hxx')
-rw-r--r-- | sw/inc/ndindex.hxx | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/sw/inc/ndindex.hxx b/sw/inc/ndindex.hxx index f31c851ad1f8..b6e7ca2e22a9 100644 --- a/sw/inc/ndindex.hxx +++ b/sw/inc/ndindex.hxx @@ -75,7 +75,7 @@ public: if( nDiff ) pNd = rNd.GetNodes()[ rNd.GetIndex() + nDiff ]; else - pNd = (SwNode*)&rNd; + pNd = const_cast<SwNode*>(&rNd); RegisterIndex( pNd->GetNodes() ); } @@ -277,11 +277,11 @@ SwNodeIndex& SwNodeIndex::operator=( const SwNode& rNd ) if( &pNd->GetNodes() != &rNd.GetNodes() ) { DeRegisterIndex( pNd->GetNodes() ); - pNd = (SwNode*)&rNd; + pNd = const_cast<SwNode*>(&rNd); RegisterIndex( pNd->GetNodes() ); } else - pNd = (SwNode*)&rNd; + pNd = const_cast<SwNode*>(&rNd); return *this; } @@ -303,11 +303,11 @@ SwNodeIndex& SwNodeIndex::Assign( const SwNode& rNd, long nOffset ) if( &pNd->GetNodes() != &rNd.GetNodes() ) { DeRegisterIndex( pNd->GetNodes() ); - pNd = (SwNode*)&rNd; + pNd = const_cast<SwNode*>(&rNd); RegisterIndex( pNd->GetNodes() ); } else - pNd = (SwNode*)&rNd; + pNd = const_cast<SwNode*>(&rNd); if( nOffset ) pNd = pNd->GetNodes()[ pNd->GetIndex() + nOffset ]; |