From bf7ac07c04cb06316b745eb9716787b16c1314dd Mon Sep 17 00:00:00 2001 From: Johann Date: Tue, 17 Dec 2024 13:16:39 +0100 Subject: tdf#158237: Use C++20 contains() instead of find() and end() Change-Id: I0528229042aa62d3d99e8dbaad68a86d41cf369a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/178659 Reviewed-by: Ilmari Lauhakangas Tested-by: Jenkins --- vcl/source/cnttype/mcnttype.cxx | 2 +- vcl/source/window/builder.cxx | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) (limited to 'vcl/source') diff --git a/vcl/source/cnttype/mcnttype.cxx b/vcl/source/cnttype/mcnttype.cxx index cc5facf17717..2c1ff0ed9a5f 100644 --- a/vcl/source/cnttype/mcnttype.cxx +++ b/vcl/source/cnttype/mcnttype.cxx @@ -53,7 +53,7 @@ css::uno::Sequence< OUString > SAL_CALL CMimeContentType::getParameters( ) sal_Bool SAL_CALL CMimeContentType::hasParameter( const OUString& aName ) { - return ( m_ParameterMap.end( ) != m_ParameterMap.find( aName.toAsciiLowerCase() ) ); + return m_ParameterMap.contains( aName.toAsciiLowerCase() ); } OUString SAL_CALL CMimeContentType::getParameterValue( const OUString& aName ) diff --git a/vcl/source/window/builder.cxx b/vcl/source/window/builder.cxx index df2df8235f68..b21d26bb5f1e 100644 --- a/vcl/source/window/builder.cxx +++ b/vcl/source/window/builder.cxx @@ -1673,7 +1673,7 @@ VclPtr VclBuilder::makeObject(vcl::Window *pParent, const OUString } else if (name == "GtkIconView") { - assert(rMap.find(u"model"_ustr) != rMap.end() && "GtkIconView must have a model"); + assert(rMap.contains(u"model"_ustr) && "GtkIconView must have a model"); //window we want to apply the packing props for this GtkIconView to VclPtr xWindowForPackingProps; @@ -1696,7 +1696,7 @@ VclPtr VclBuilder::makeObject(vcl::Window *pParent, const OUString { if (!isLegacy()) { - assert(rMap.find(u"model"_ustr) != rMap.end() && "GtkTreeView must have a model"); + assert(rMap.contains(u"model"_ustr) && "GtkTreeView must have a model"); } //window we want to apply the packing props for this GtkTreeView to -- cgit