Kaydet (Commit) 2559e011 authored tarafından Bjoern Michaelsen's avatar Bjoern Michaelsen

Last() superficial check

Change-Id: Ic0ded0288e322ac99f0500973c304db60e23c9de
üst ed02fd49
...@@ -413,7 +413,7 @@ SwClient* SwClientIter::operator++() ...@@ -413,7 +413,7 @@ SwClient* SwClientIter::operator++()
SwClient* SwClientIter::GoStart() SwClient* SwClientIter::GoStart()
{ {
if(pDelNext = const_cast<SwClient*>(rRoot.GetDepends())) if((pDelNext = const_cast<SwClient*>(rRoot.GetDepends())))
while( pDelNext->m_pLeft ) while( pDelNext->m_pLeft )
pDelNext = static_cast<SwClient*>(pDelNext->m_pLeft); pDelNext = static_cast<SwClient*>(pDelNext->m_pLeft);
return pAct = pDelNext; return pAct = pDelNext;
...@@ -421,7 +421,9 @@ SwClient* SwClientIter::GoStart() ...@@ -421,7 +421,9 @@ SwClient* SwClientIter::GoStart()
SwClient* SwClientIter::GoEnd() SwClient* SwClientIter::GoEnd()
{ {
if(pDelNext = const_cast<SwClient*>(rRoot.GetDepends())) if(!pDelNext)
pDelNext = const_cast<SwClient*>(rRoot.GetDepends());
if(pDelNext)
while( pDelNext->m_pRight ) while( pDelNext->m_pRight )
pDelNext = static_cast<SwClient*>(pDelNext->m_pRight); pDelNext = static_cast<SwClient*>(pDelNext->m_pRight);
return pAct = pDelNext; return pAct = pDelNext;
...@@ -443,7 +445,7 @@ SwClient* SwClientIter::Last( TypeId nType ) ...@@ -443,7 +445,7 @@ SwClient* SwClientIter::Last( TypeId nType )
GoEnd(); GoEnd();
if(!pDelNext) if(!pDelNext)
return nullptr; return nullptr;
if( pDelNext && pDelNext->IsA( aSrchId ) ) if( pDelNext->IsA( aSrchId ) )
return pDelNext; return pDelNext;
return Previous(); return Previous();
} }
......
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