From 46869037d0fee5601815f3e8ff12764564ae3489 Mon Sep 17 00:00:00 2001 From: Noel Grandin Date: Wed, 29 Jun 2022 20:50:11 +0200 Subject: 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 --- svl/source/notify/SfxBroadcaster.cxx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'svl') 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) -- cgit v1.2.3