[Libreoffice-commits] core.git: svl/source sw/source

Mike Kaganski (via logerrit) logerrit at kemper.freedesktop.org
Mon Sep 30 12:25:17 UTC 2019


 svl/source/items/itemiter.cxx  |    3 +--
 sw/source/core/undo/rolbck.cxx |    2 --
 2 files changed, 1 insertion(+), 4 deletions(-)

New commits:
commit 227734f528979fb12733d1ea6c4a951fbfa17bd8
Author:     Mike Kaganski <mike.kaganski at collabora.com>
AuthorDate: Mon Sep 30 11:37:40 2019 +0200
Commit:     Mike Kaganski <mike.kaganski at collabora.com>
CommitDate: Mon Sep 30 14:24:20 2019 +0200

    Simplify iterating in SwRegHistory::MakeSetWhichIds a little
    
    The IsAtEnd check is redundant here.
    
    Change-Id: Ie576d039ea3db5f98d9c8c3dfd7e77519fcc1e1d
    Reviewed-on: https://gerrit.libreoffice.org/79836
    Tested-by: Jenkins
    Reviewed-by: Mike Kaganski <mike.kaganski at collabora.com>

diff --git a/svl/source/items/itemiter.cxx b/svl/source/items/itemiter.cxx
index 2285122e0d87..aaedcf26ae33 100644
--- a/svl/source/items/itemiter.cxx
+++ b/svl/source/items/itemiter.cxx
@@ -52,10 +52,9 @@ SfxItemIter::~SfxItemIter()
 
 const SfxPoolItem* SfxItemIter::NextItem()
 {
-    SfxPoolItem const** ppFnd = m_rSet.m_pItems.get();
-
     if (m_nCurrent < m_nEnd)
     {
+        SfxPoolItem const** ppFnd = m_rSet.m_pItems.get();
         do {
             m_nCurrent++;
         } while (m_nCurrent < m_nEnd && !*(ppFnd + m_nCurrent ));
diff --git a/sw/source/core/undo/rolbck.cxx b/sw/source/core/undo/rolbck.cxx
index 77e594e9dafc..2fbc1356f4cf 100644
--- a/sw/source/core/undo/rolbck.cxx
+++ b/sw/source/core/undo/rolbck.cxx
@@ -1450,8 +1450,6 @@ void SwRegHistory::MakeSetWhichIds()
             {
                 sal_uInt16 nW = pItem->Which();
                 m_WhichIdSet.insert( nW );
-                if( aIter.IsAtEnd() )
-                    break;
                 pItem = aIter.NextItem();
             }
         }


More information about the Libreoffice-commits mailing list