connectivity/source/commontools/dbtools.cxx | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-)
New commits: commit e8b87270275d50da744bae30ffc54e23a6026476 Author: Simon Chenery <[email protected]> AuthorDate: Tue Oct 7 20:38:13 2025 +0200 Commit: Hossein <[email protected]> CommitDate: Wed Oct 8 17:49:36 2025 +0200 tdf#158237 Use C++20 contains() instead of find(), end() in dbtools.cxx Change-Id: I32256e1d9615d0b9f224a311d47e094d54a21862 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/192049 Tested-by: Jenkins Reviewed-by: Hossein <[email protected]> diff --git a/connectivity/source/commontools/dbtools.cxx b/connectivity/source/commontools/dbtools.cxx index 63c6ac25257f..e87425554d6f 100644 --- a/connectivity/source/commontools/dbtools.cxx +++ b/connectivity/source/commontools/dbtools.cxx @@ -1387,7 +1387,7 @@ OUString createUniqueName( const Sequence< OUString >& _rNames, const OUString& if ( _bStartWithNumber ) sName += OUString::number( nPos ); - while ( aUsedNames.find( sName ) != aUsedNames.end() ) + while ( aUsedNames.contains( sName ) ) { sName = _rBaseName + OUString::number( ++nPos ); } @@ -1706,8 +1706,7 @@ void askForParameters(const Reference< XSingleSelectQueryComposer >& _xComposer, OUString sName; xParam->getPropertyValue(PROPERTY_NAME) >>= sName; - TParameterPositions::const_iterator aFind = aParameterNames.find(sName); - if ( aFind != aParameterNames.end() ) + if ( aParameterNames.contains(sName) ) aNewParameterSet[i] = true; aParameterNames[sName].push_back(i+1); }
