[Libreoffice-commits] core.git: sd/source
Muhammet Kara (via logerrit)
logerrit at kemper.freedesktop.org
Mon Feb 10 15:09:39 UTC 2020
sd/source/ui/framework/configuration/ConfigurationControllerBroadcaster.cxx | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
New commits:
commit 85acb421cfaeda49471ad21b5c68f26e2cddc7f0
Author: Muhammet Kara <muhammet.kara at collabora.com>
AuthorDate: Mon Feb 10 03:07:56 2020 +0300
Commit: Muhammet Kara <muhammet.kara at collabora.com>
CommitDate: Mon Feb 10 16:09:01 2020 +0100
Avoid additional search in case of insertion
Change-Id: If53add597daea0dc6ba77d92297d0dd0303c3500
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/88354
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin at collabora.co.uk>
diff --git a/sd/source/ui/framework/configuration/ConfigurationControllerBroadcaster.cxx b/sd/source/ui/framework/configuration/ConfigurationControllerBroadcaster.cxx
index c3ff65ccb80e..51e24b81ce41 100644
--- a/sd/source/ui/framework/configuration/ConfigurationControllerBroadcaster.cxx
+++ b/sd/source/ui/framework/configuration/ConfigurationControllerBroadcaster.cxx
@@ -46,8 +46,8 @@ void ConfigurationControllerBroadcaster::AddListener(
mxConfigurationController,
0);
- if (maListenerMap.find(rsEventType) == maListenerMap.end())
- maListenerMap[rsEventType] = ListenerList();
+ maListenerMap.try_emplace(rsEventType, ListenerList());
+
ListenerDescriptor aDescriptor;
aDescriptor.mxListener = rxListener;
aDescriptor.maUserData = rUserData;
More information about the Libreoffice-commits
mailing list