summaryrefslogtreecommitdiff
path: root/sw
diff options
context:
space:
mode:
authorBjoern Michaelsen <bjoern.michaelsen@canonical.com>2015-03-13 01:51:42 +0100
committerBjoern Michaelsen <bjoern.michaelsen@canonical.com>2015-03-14 02:23:41 +0100
commit5a0d2a4e927ed0c13468febd814cd1d8cfc11112 (patch)
treea7a50c6f95f305a52c73d9636517d2263f98113a /sw
parent5730b4b7b20421ed5fce33365b925d640e8e5f21 (diff)
simplify SwClientIter dtor
Change-Id: Ibf41f0c53b0454029601dd1cac479bdd82f50f0c
Diffstat (limited to 'sw')
-rw-r--r--sw/source/core/attr/calbck.cxx23
1 files changed, 10 insertions, 13 deletions
diff --git a/sw/source/core/attr/calbck.cxx b/sw/source/core/attr/calbck.cxx
index 7ad963da2f93..17aabca25f08 100644
--- a/sw/source/core/attr/calbck.cxx
+++ b/sw/source/core/attr/calbck.cxx
@@ -377,22 +377,19 @@ SwClientIter::SwClientIter( const SwModify& rModify )
SwClientIter::~SwClientIter()
{
- if( pClientIters )
+ assert(pClientIters);
+ // reorganize list of ClientIters
+ if( pClientIters == this )
+ pClientIters = pNxtIter;
+ else
{
- // reorganize list of ClientIters
- if( pClientIters == this )
- pClientIters = pNxtIter;
- else
+ SwClientIter* pTmp = pClientIters;
+ while( pTmp->pNxtIter != this )
{
- SwClientIter* pTmp = pClientIters;
- while( pTmp->pNxtIter != this )
- if( nullptr == ( pTmp = pTmp->pNxtIter ) )
- {
- OSL_ENSURE( this, "Lost my pointer" );
- return ;
- }
- pTmp->pNxtIter = pNxtIter;
+ assert(pTmp);
+ pTmp = pTmp->pNxtIter;
}
+ pTmp->pNxtIter = pNxtIter;
}
}