From d0e848dab096160b16c4778ba25a40d1e5ff82af Mon Sep 17 00:00:00 2001 From: Noel Grandin <noel.grandin@collabora.co.uk> Date: Wed, 15 Nov 2023 10:48:27 +0200 Subject: 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> --- sc/source/ui/Accessibility/AccessibleSpreadsheet.cxx | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'sc') diff --git a/sc/source/ui/Accessibility/AccessibleSpreadsheet.cxx b/sc/source/ui/Accessibility/AccessibleSpreadsheet.cxx index fa57dd1a4fe7..7aaa7237ccac 100644 --- a/sc/source/ui/Accessibility/AccessibleSpreadsheet.cxx +++ b/sc/source/ui/Accessibility/AccessibleSpreadsheet.cxx @@ -1170,8 +1170,9 @@ uno::Reference<XAccessible > SAL_CALL throw lang::IndexOutOfBoundsException(); } ScMyAddress addr = CalcScAddressFromRangeList(mpMarkedRanges.get(),nSelectedChildIndex); - if( m_mapSelectionSend.find(addr) != m_mapSelectionSend.end() ) - xAccessible = m_mapSelectionSend[addr]; + auto it = m_mapSelectionSend.find(addr); + if( it != m_mapSelectionSend.end() ) + xAccessible = it->second; else xAccessible = getAccessibleCellAt(addr.Row(), addr.Col()); } -- cgit