sw/source/core/doc/docredln.cxx |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

New commits:
commit f6d38519aa5179d325d786a09f7e0b716757c1f8
Author:     Mike Kaganski <mike.kagan...@collabora.com>
AuthorDate: Tue Jul 1 14:11:34 2025 +0500
Commit:     Mike Kaganski <mike.kagan...@collabora.com>
CommitDate: Tue Jul 1 13:28:08 2025 +0200

    Simplify a bit
    
    Initialize the variable on declaration; use clearer 'while' instead
    of 'for'.
    
    Change-Id: I461a3b0556e362006a47245dbc504b46807a23c8
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/187231
    Reviewed-by: Mike Kaganski <mike.kagan...@collabora.com>
    Tested-by: Jenkins

diff --git a/sw/source/core/doc/docredln.cxx b/sw/source/core/doc/docredln.cxx
index 7d0baef0c994..f9e35eb42581 100644
--- a/sw/source/core/doc/docredln.cxx
+++ b/sw/source/core/doc/docredln.cxx
@@ -1749,13 +1749,13 @@ void SwRangeRedline::ShowOriginal(sal_uInt16 nLoop, 
size_t nMyPos, bool /*bForce
 {
     SwDoc& rDoc = GetDoc();
     RedlineFlags eOld = rDoc.getIDocumentRedlineAccess().GetRedlineFlags();
-    SwRedlineData* pCur;
 
     rDoc.getIDocumentRedlineAccess().SetRedlineFlags_intern(eOld | 
RedlineFlags::Ignore);
     ::sw::UndoGuard const undoGuard(rDoc.GetIDocumentUndoRedo());
 
     // Determine the Type, it's the first on Stack
-    for( pCur = m_pRedlineData; pCur->m_pNext; )
+    SwRedlineData* pCur = m_pRedlineData;
+    while (pCur->m_pNext)
         pCur = pCur->m_pNext;
 
     switch( pCur->m_eType )

Reply via email to