summaryrefslogtreecommitdiff
path: root/svl
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2022-06-29 20:50:11 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2022-07-01 09:46:25 +0200
commit46869037d0fee5601815f3e8ff12764564ae3489 (patch)
treed812133b7e1274320061db404cd9884498ce51d9 /svl
parentec31df481568f6a654e5f6c1d597dc8b963b99e6 (diff)
small optimisation
in a very hot spot Change-Id: I2115fb23e217de7cdd84f7301acd3a27829f3298 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/136660 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'svl')
-rw-r--r--svl/source/notify/SfxBroadcaster.cxx3
1 files changed, 2 insertions, 1 deletions
diff --git a/svl/source/notify/SfxBroadcaster.cxx b/svl/source/notify/SfxBroadcaster.cxx
index dbd1ab3a7191..ae1be1475c91 100644
--- a/svl/source/notify/SfxBroadcaster.cxx
+++ b/svl/source/notify/SfxBroadcaster.cxx
@@ -32,7 +32,8 @@
void SfxBroadcaster::Broadcast(const SfxHint& rHint)
{
// notify all registered listeners exactly once
- for (size_t i = 0; i < m_Listeners.size(); ++i)
+ size_t nSize = m_Listeners.size();
+ for (size_t i = 0; i < nSize; ++i)
{
SfxListener* const pListener = m_Listeners[i];
if (pListener)