From 6dbae37b8d2d2d1ecad85c772fd684803b5a52cb Mon Sep 17 00:00:00 2001 From: Noel Grandin Date: Tue, 28 Aug 2018 11:15:47 +0200 Subject: loplugin:constantparam (1) Change-Id: I25077e391ecca1b678062d261a83d88daadf0a58 Reviewed-on: https://gerrit.libreoffice.org/59701 Tested-by: Jenkins Reviewed-by: Noel Grandin --- connectivity/source/commontools/ConnectionWrapper.cxx | 2 +- connectivity/source/commontools/dbtools2.cxx | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) (limited to 'connectivity/source/commontools') diff --git a/connectivity/source/commontools/ConnectionWrapper.cxx b/connectivity/source/commontools/ConnectionWrapper.cxx index ff966e65bbee..bd62d64990be 100644 --- a/connectivity/source/commontools/ConnectionWrapper.cxx +++ b/connectivity/source/commontools/ConnectionWrapper.cxx @@ -120,7 +120,7 @@ css::uno::Sequence< OUString > SAL_CALL OConnectionWrapper::getSupportedServiceN // append our own service, if necessary OUString sConnectionService( "com.sun.star.sdbc.Connection" ); - if ( 0 == ::comphelper::findValue( aSupported, sConnectionService, true ).getLength() ) + if ( ::comphelper::findValue( aSupported, sConnectionService ) == -1 ) { sal_Int32 nLen = aSupported.getLength(); aSupported.realloc( nLen + 1 ); diff --git a/connectivity/source/commontools/dbtools2.cxx b/connectivity/source/commontools/dbtools2.cxx index 5e1296adbbc6..535baadb49d1 100644 --- a/connectivity/source/commontools/dbtools2.cxx +++ b/connectivity/source/commontools/dbtools2.cxx @@ -997,10 +997,10 @@ bool isAggregateColumn(const Reference< XSingleSelectQueryComposer > &_xParser, if (xColumnsSupplier.is()) xCols = xColumnsSupplier->getColumns(); - return isAggregateColumn(xCols, sName, false/*whenNotFound*/); + return isAggregateColumn(xCols, sName); } -bool isAggregateColumn(const Reference< XNameAccess > &_xColumns, const OUString &_sName, bool whenNotFound) +bool isAggregateColumn(const Reference< XNameAccess > &_xColumns, const OUString &_sName) { if ( _xColumns.is() && _xColumns->hasByName(_sName) ) { @@ -1008,7 +1008,7 @@ bool isAggregateColumn(const Reference< XNameAccess > &_xColumns, const OUString assert(xProp.is()); return isAggregateColumn( xProp ); } - return whenNotFound; + return false; } bool isAggregateColumn( const Reference< XPropertySet > &_xColumn ) -- cgit