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.kagan...@collabora.com> AuthorDate: Mon Sep 30 11:37:40 2019 +0200 Commit: Mike Kaganski <mike.kagan...@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.kagan...@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(); } } _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits