summaryrefslogtreecommitdiff
path: root/sd
diff options
context:
space:
mode:
authorMuhammet Kara <muhammet.kara@collabora.com>2020-02-10 03:07:56 +0300
committerMuhammet Kara <muhammet.kara@collabora.com>2020-02-10 16:09:01 +0100
commit85acb421cfaeda49471ad21b5c68f26e2cddc7f0 (patch)
tree621b6c26f85f08bb4ef7a588689a89ecfef2f8b8 /sd
parent48a307b69713a244e747b3a4d444d6793d59b8d9 (diff)
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@collabora.co.uk>
Diffstat (limited to 'sd')
-rw-r--r--sd/source/ui/framework/configuration/ConfigurationControllerBroadcaster.cxx4
1 files changed, 2 insertions, 2 deletions
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;