summaryrefslogtreecommitdiff
path: root/svl
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2021-06-10 11:48:54 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2021-06-10 16:19:52 +0200
commit9614c3c97bdc544e358ac9979b5a1f2681cfa8d6 (patch)
treea4d4ddaf6813c05e0494bc17d5e43b5108a9af06 /svl
parent67cadbe2a9165f99de7d47a861954c6bc6c5f216 (diff)
small optimisation in SvtListener::EndListening
erase immediately after find so we're working with cache-hot data. Instead of calling something else, which will load other stuff, then reload the data to do the erase. Change-Id: Ibbcca584b488ec3edc5b271efbd15d9a9ea2213f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/116986 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'svl')
-rw-r--r--svl/source/notify/listener.cxx2
1 files changed, 1 insertions, 1 deletions
diff --git a/svl/source/notify/listener.cxx b/svl/source/notify/listener.cxx
index e1226f855f7c..172dbdb8b31d 100644
--- a/svl/source/notify/listener.cxx
+++ b/svl/source/notify/listener.cxx
@@ -58,9 +58,9 @@ void SvtListener::EndListening( SvtBroadcaster& rBroadcaster )
if (it == maBroadcasters.end())
// Not listening to this broadcaster.
return;
+ maBroadcasters.erase(it);
rBroadcaster.Remove(this);
- maBroadcasters.erase(it);
}
// called from the SvtBroadcaster destructor, used to avoid calling