diff options
author | Johann <jlorber@linagora.com> | 2024-12-17 13:16:39 +0100 |
---|---|---|
committer | Ilmari Lauhakangas <ilmari.lauhakangas@libreoffice.org> | 2024-12-27 16:20:47 +0100 |
commit | bf7ac07c04cb06316b745eb9716787b16c1314dd (patch) | |
tree | b2d27cb3fe0375ffeedb95a45264325cf1803a94 /vcl/source | |
parent | d2d9af865880d5da94e86f40d18686433ff821df (diff) |
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 <ilmari.lauhakangas@libreoffice.org>
Tested-by: Jenkins
Diffstat (limited to 'vcl/source')
-rw-r--r-- | vcl/source/cnttype/mcnttype.cxx | 2 | ||||
-rw-r--r-- | vcl/source/window/builder.cxx | 4 |
2 files changed, 3 insertions, 3 deletions
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<vcl::Window> 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<vcl::Window> xWindowForPackingProps; @@ -1696,7 +1696,7 @@ VclPtr<vcl::Window> 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 |