diff options
author | Bjoern Michaelsen <bjoern.michaelsen@canonical.com> | 2015-03-12 23:07:23 +0100 |
---|---|---|
committer | Bjoern Michaelsen <bjoern.michaelsen@canonical.com> | 2015-03-14 02:23:37 +0100 |
commit | 9a74f77cb5e275bc7af876538fcf3f1d05f76567 (patch) | |
tree | c14e0c02a7c5deb23573231bb162bed679c4a502 | |
parent | f811ac1a1940bb58808803d29b77fdc3218568ee (diff) |
simplify SwClient::Last()
Change-Id: I16639d345fef0fa578d30e43d6283e54bbd52b5b
-rw-r--r-- | sw/source/core/attr/calbck.cxx | 19 |
1 files changed, 7 insertions, 12 deletions
diff --git a/sw/source/core/attr/calbck.cxx b/sw/source/core/attr/calbck.cxx index ac3926d551e4..c5de756b34e1 100644 --- a/sw/source/core/attr/calbck.cxx +++ b/sw/source/core/attr/calbck.cxx @@ -447,18 +447,13 @@ SwClient* SwClientIter::Last( TypeId nType ) { aSrchId = nType; GoEnd(); - if( pAct ) - do { - if( pAct->IsA( aSrchId ) ) - break; - - if( pDelNext == pAct ) - pAct = static_cast<SwClient*>(pAct->m_pLeft); - else - pAct = static_cast<SwClient*>(pDelNext->m_pLeft); - pDelNext = pAct; - } while( pAct ); - return pAct; + while( pDelNext ) + { + if( pDelNext->IsA( aSrchId ) ) + break; + pDelNext = static_cast<SwClient*>(pDelNext->m_pLeft); + } + return pAct = pDelNext; } SwClient* SwClientIter::Next() |