diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2020-07-30 10:33:15 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2020-08-01 13:14:05 +0200 |
commit | fb34aeb7842eaa852c82c3d73c722411c11885d7 (patch) | |
tree | 73547992845972e7b25fbce01c2657b967122c40 /sw/source/core/bastyp | |
parent | a0ec43251e8b8a0805306ca5ad86794550916fce (diff) |
loplugin:flatten in sw/core/access..sc/core/crsr
Change-Id: I073545c11e2261703e5255abefaf82a2bbea5211
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/99934
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'sw/source/core/bastyp')
-rw-r--r-- | sw/source/core/bastyp/index.cxx | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/sw/source/core/bastyp/index.cxx b/sw/source/core/bastyp/index.cxx index 073b6656311d..7fe9b5571a43 100644 --- a/sw/source/core/bastyp/index.cxx +++ b/sw/source/core/bastyp/index.cxx @@ -286,19 +286,19 @@ void SwIndexReg::Update( void SwIndexReg::MoveTo( SwIndexReg& rArr ) { - if (this != &rArr && m_pFirst) + if (!(this != &rArr && m_pFirst)) + return; + + SwIndex * pIdx = const_cast<SwIndex*>(m_pFirst); + SwIndex * pNext; + while( pIdx ) { - SwIndex * pIdx = const_cast<SwIndex*>(m_pFirst); - SwIndex * pNext; - while( pIdx ) - { - pNext = pIdx->m_pNext; - pIdx->Assign( &rArr, pIdx->GetIndex() ); - pIdx = pNext; - } - m_pFirst = nullptr; - m_pLast = nullptr; + pNext = pIdx->m_pNext; + pIdx->Assign( &rArr, pIdx->GetIndex() ); + pIdx = pNext; } + m_pFirst = nullptr; + m_pLast = nullptr; } #ifdef DBG_UTIL |