diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2022-10-31 08:04:19 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2022-10-31 09:22:36 +0100 |
commit | 92cd851c924486829aa7592ee41a62d2d97b755d (patch) | |
tree | 5fe40f4af0384e8b62a567f59c9cd29a8d2491a5 /svl | |
parent | 7fc2aefc09956bee0353575d2bacca2d5b556b04 (diff) |
tdf#126788 only call TotalCount() if we need the result
Change-Id: Idcacc67f005204ac499f8cdff2792e97636ae85c
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/142056
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'svl')
-rw-r--r-- | svl/source/items/itemset.cxx | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/svl/source/items/itemset.cxx b/svl/source/items/itemset.cxx index 4894e85a6a06..655956f2d1cc 100644 --- a/svl/source/items/itemset.cxx +++ b/svl/source/items/itemset.cxx @@ -157,9 +157,9 @@ SfxItemSet::~SfxItemSet() { if (!m_pWhichRanges.empty()) // might be nullptr if we have been moved-from { - sal_uInt16 nCount = TotalCount(); if( Count() ) { + sal_uInt16 nCount = TotalCount(); SfxPoolItem const** ppFnd = m_ppItems; for( sal_uInt16 nCnt = nCount; nCnt; --nCnt, ++ppFnd ) if( *ppFnd && !IsInvalidItem(*ppFnd) ) |