summaryrefslogtreecommitdiff
path: root/sw
diff options
context:
space:
mode:
authorBjoern Michaelsen <bjoern.michaelsen@canonical.com>2015-03-12 23:58:18 +0100
committerBjoern Michaelsen <bjoern.michaelsen@canonical.com>2015-03-14 02:23:38 +0100
commit4022e29a1aff7f2c8d3cdea860f3a9ab3aa03a03 (patch)
tree8e750ca70cf3b92479cf88b4183133141aeaa504 /sw
parent43d870a01d3b0c0fe956114669f6146d2b20447b (diff)
simplify SwClient::First() with Next()
Change-Id: If66ab27cbfe47f1cbeb0ed6a340459a8911af65a
Diffstat (limited to 'sw')
-rw-r--r--sw/source/core/attr/calbck.cxx11
1 files changed, 4 insertions, 7 deletions
diff --git a/sw/source/core/attr/calbck.cxx b/sw/source/core/attr/calbck.cxx
index b84222e04f56..0dccf1f78303 100644
--- a/sw/source/core/attr/calbck.cxx
+++ b/sw/source/core/attr/calbck.cxx
@@ -434,13 +434,10 @@ SwClient* SwClientIter::First( TypeId nType )
{
aSrchId = nType;
GoStart();
- while( pDelNext )
- {
- if( pDelNext->IsA( aSrchId ) )
- break;
- pDelNext = static_cast<SwClient*>(pDelNext->m_pRight);
- }
- return pAct = pDelNext;
+ if(!pDelNext)
+ return nullptr;
+ pAct = nullptr;
+ return Next();
}
SwClient* SwClientIter::Last( TypeId nType )