summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLuv Sharma <luvsharma.del@gmail.com>2023-12-31 17:04:17 +0530
committerIlmari Lauhakangas <ilmari.lauhakangas@libreoffice.org>2024-01-01 12:05:25 +0100
commita058fa6eb87dcc4a01dac14674e15ff3ba611ced (patch)
treeb5a1acc38a5edaf4b5f150cde677ae18ee8d0158
parent8eadc80ac0c5e194a99ba57a2bf9d29e1465bdf8 (diff)
tdf#158237 chart2: use c++20 contains() instead of find() and end()
Change-Id: I065f672de257e8a16a4cb9d41ff6334e5fea1823 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/161492 Tested-by: Ilmari Lauhakangas <ilmari.lauhakangas@libreoffice.org> Reviewed-by: Ilmari Lauhakangas <ilmari.lauhakangas@libreoffice.org>
-rw-r--r--chart2/source/tools/NameContainer.cxx2
1 files changed, 1 insertions, 1 deletions
diff --git a/chart2/source/tools/NameContainer.cxx b/chart2/source/tools/NameContainer.cxx
index 23e0a2821d1c..1cc79a8eaec0 100644
--- a/chart2/source/tools/NameContainer.cxx
+++ b/chart2/source/tools/NameContainer.cxx
@@ -65,7 +65,7 @@ Sequence< OUString > SAL_CALL NameContainer::getSupportedServiceNames()
// XNameContainer
void SAL_CALL NameContainer::insertByName( const OUString& rName, const Any& rElement )
{
- if( m_aMap.find( rName ) != m_aMap.end() )
+ if( m_aMap.contains( rName ))
throw container::ElementExistException();
m_aMap.emplace( rName, rElement );
}