[Libreoffice-commits] core.git: svl/source

Noel Grandin (via logerrit) logerrit at kemper.freedesktop.org
Thu Jun 10 14:20:35 UTC 2021


 svl/source/notify/listener.cxx |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 9614c3c97bdc544e358ac9979b5a1f2681cfa8d6
Author:     Noel Grandin <noel.grandin at collabora.co.uk>
AuthorDate: Thu Jun 10 11:48:54 2021 +0200
Commit:     Noel Grandin <noel.grandin at collabora.co.uk>
CommitDate: Thu Jun 10 16:19:52 2021 +0200

    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 at collabora.co.uk>

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


More information about the Libreoffice-commits mailing list