Kaydet (Commit) 583c9496 authored tarafından Bjoern Michaelsen's avatar Bjoern Michaelsen

c-style cast to const_cast

Change-Id: Ie5d8483305f4ef2d76c291fcb8c707a69ba9cf52
üst 310eb665
......@@ -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 ];
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment