summaryrefslogtreecommitdiff
path: root/sw/source/uibase/envelp
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2023-11-15 10:48:27 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2023-11-15 12:04:31 +0100
commitd0e848dab096160b16c4778ba25a40d1e5ff82af (patch)
treefec4a155c91994a19aa3b13599749a2563329685 /sw/source/uibase/envelp
parentdef8f7699661f3ca9d763b6bd5e81759cf5b4e12 (diff)
avoid double map lookup
Change-Id: I02018eaaf220c7835756eba6215425bac9cbc6f3 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/159432 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'sw/source/uibase/envelp')
-rw-r--r--sw/source/uibase/envelp/labelcfg.cxx4
1 files changed, 2 insertions, 2 deletions
diff --git a/sw/source/uibase/envelp/labelcfg.cxx b/sw/source/uibase/envelp/labelcfg.cxx
index 8d98c7a9f1eb..f974a3e799db 100644
--- a/sw/source/uibase/envelp/labelcfg.cxx
+++ b/sw/source/uibase/envelp/labelcfg.cxx
@@ -251,8 +251,8 @@ void SwLabelConfig::FillLabels(const OUString& rManufacturer, SwLabRecs& rLab
bool SwLabelConfig::HasLabel(const OUString& rManufacturer, const OUString& rType)
{
- return ( ( m_aLabels.find(rManufacturer) != m_aLabels.end() ) &&
- ( m_aLabels[rManufacturer].find(rType) != m_aLabels[rManufacturer].end() ) );
+ auto it = m_aLabels.find(rManufacturer);
+ return ( it != m_aLabels.end() ) && ( it->second.find(rType) != it->second.end() );
}
// label is always saved as a custom label