diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2017-06-30 09:44:26 +0200 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2017-06-30 09:44:26 +0200 |
commit | 489a6ba4aab012bf71d5f6783c0e9cc1c207d1d6 (patch) | |
tree | acda5819fa3c1af62fd7171ea769d372ed8b06f1 /connectivity | |
parent | af3a46d7630a26fd4d54a3b47a3d9beaa5e88c83 (diff) |
loplugin:oncevar
Change-Id: Id19ffb1d4817a882bc3f8f73c3ead932c5a92aeb
Diffstat (limited to 'connectivity')
-rw-r--r-- | connectivity/source/drivers/macab/MacabDatabaseMetaData.cxx | 75 | ||||
-rw-r--r-- | connectivity/source/drivers/macab/MacabResultSet.cxx | 6 | ||||
-rw-r--r-- | connectivity/source/drivers/macab/MacabStatement.cxx | 3 |
3 files changed, 28 insertions, 56 deletions
diff --git a/connectivity/source/drivers/macab/MacabDatabaseMetaData.cxx b/connectivity/source/drivers/macab/MacabDatabaseMetaData.cxx index 2f520d387cfc..e6c05084f794 100644 --- a/connectivity/source/drivers/macab/MacabDatabaseMetaData.cxx +++ b/connectivity/source/drivers/macab/MacabDatabaseMetaData.cxx @@ -66,76 +66,64 @@ OUString SAL_CALL MacabDatabaseMetaData::getCatalogSeparator( ) sal_Int32 SAL_CALL MacabDatabaseMetaData::getMaxBinaryLiteralLength( ) { - sal_Int32 nValue = 0; // 0 means no limit - return nValue; + return 0; // 0 means no limit } sal_Int32 SAL_CALL MacabDatabaseMetaData::getMaxRowSize( ) { - sal_Int32 nValue = 0; // 0 means no limit - return nValue; + return 0; // 0 means no limit } sal_Int32 SAL_CALL MacabDatabaseMetaData::getMaxCatalogNameLength( ) { - sal_Int32 nValue = 0; // 0 means no limit - return nValue; + return 0; // 0 means no limit } sal_Int32 SAL_CALL MacabDatabaseMetaData::getMaxCharLiteralLength( ) { - sal_Int32 nValue = 0; // 0 means no limit - return nValue; + return 0; // 0 means no limit } sal_Int32 SAL_CALL MacabDatabaseMetaData::getMaxColumnNameLength( ) { - sal_Int32 nValue = 0; // 0 means no limit - return nValue; + return 0; // 0 means no limit } sal_Int32 SAL_CALL MacabDatabaseMetaData::getMaxColumnsInIndex( ) { - sal_Int32 nValue = 0; // 0 means no limit - return nValue; + return 0; // 0 means no limit } sal_Int32 SAL_CALL MacabDatabaseMetaData::getMaxCursorNameLength( ) { - sal_Int32 nValue = 0; // 0 means no limit - return nValue; + return 0; // 0 means no limit } sal_Int32 SAL_CALL MacabDatabaseMetaData::getMaxConnections( ) { - sal_Int32 nValue = 0; // 0 means no limit - return nValue; + return 0; // 0 means no limit } sal_Int32 SAL_CALL MacabDatabaseMetaData::getMaxColumnsInTable( ) { - sal_Int32 nValue = 0; // 0 means no limit - return nValue; + return 0; // 0 means no limit } sal_Int32 SAL_CALL MacabDatabaseMetaData::getMaxStatementLength( ) { - sal_Int32 nValue = 0; // 0 means no limit - return nValue; + return 0; // 0 means no limit } sal_Int32 SAL_CALL MacabDatabaseMetaData::getMaxTableNameLength( ) { - sal_Int32 nValue = 0; // 0 means no limit - return nValue; + return 0; // 0 means no limit } sal_Int32 SAL_CALL MacabDatabaseMetaData::getMaxTablesInSelect( ) { // MaxTablesInSelect describes how many tables can participate in the FROM part of a given SELECT statement, // currently, the resultset/statement implementations can cope with one table only - sal_Int32 nValue = 1; - return nValue; + return 1; } sal_Bool SAL_CALL MacabDatabaseMetaData::doesMaxRowSizeIncludeBlobs( ) @@ -185,8 +173,7 @@ sal_Bool SAL_CALL MacabDatabaseMetaData::supportsAlterTableWithDropColumn( ) sal_Int32 SAL_CALL MacabDatabaseMetaData::getMaxIndexLength( ) { - sal_Int32 nValue = 0; // 0 means no limit - return nValue; + return 0; // 0 means no limit } sal_Bool SAL_CALL MacabDatabaseMetaData::supportsNonNullableColumns( ) @@ -206,8 +193,7 @@ OUString SAL_CALL MacabDatabaseMetaData::getCatalogTerm( ) OUString SAL_CALL MacabDatabaseMetaData::getIdentifierQuoteString( ) { // normally this is " - OUString aVal("\""); - return aVal; + return "\""; } OUString SAL_CALL MacabDatabaseMetaData::getExtraNameCharacters( ) @@ -223,11 +209,10 @@ sal_Bool SAL_CALL MacabDatabaseMetaData::supportsDifferentTableCorrelationNames( sal_Bool SAL_CALL MacabDatabaseMetaData::isCatalogAtStart( ) { - bool bValue = false; if (m_bUseCatalog) { } - return bValue; + return false; } sal_Bool SAL_CALL MacabDatabaseMetaData::dataDefinitionIgnoredInTransactions( ) @@ -337,20 +322,17 @@ sal_Bool SAL_CALL MacabDatabaseMetaData::supportsOuterJoins( ) sal_Int32 SAL_CALL MacabDatabaseMetaData::getMaxStatements( ) { - sal_Int32 nValue = 0; // 0 means no limit - return nValue; + return 0; // 0 means no limit } sal_Int32 SAL_CALL MacabDatabaseMetaData::getMaxProcedureNameLength( ) { - sal_Int32 nValue = 0; // 0 means no limit - return nValue; + return 0; // 0 means no limit } sal_Int32 SAL_CALL MacabDatabaseMetaData::getMaxSchemaNameLength( ) { - sal_Int32 nValue = 0; // 0 means no limit - return nValue; + return 0; // 0 means no limit } sal_Bool SAL_CALL MacabDatabaseMetaData::supportsTransactions( ) @@ -553,8 +535,7 @@ OUString SAL_CALL MacabDatabaseMetaData::getURL( ) { // if someday we support more than the default address book, // this method should return the URL which was used to create it - OUString aValue( "sdbc:address:macab:" ); - return aValue; + return "sdbc:address:macab:"; } OUString SAL_CALL MacabDatabaseMetaData::getUserName( ) @@ -565,14 +546,12 @@ OUString SAL_CALL MacabDatabaseMetaData::getUserName( ) OUString SAL_CALL MacabDatabaseMetaData::getDriverName( ) { - OUString aValue( "macab" ); - return aValue; + return "macab"; } OUString SAL_CALL MacabDatabaseMetaData::getDriverVersion() { - OUString aValue(MACAB_DRIVER_VERSION); - return aValue; + return MACAB_DRIVER_VERSION; } OUString SAL_CALL MacabDatabaseMetaData::getDatabaseProductVersion( ) @@ -673,26 +652,22 @@ sal_Bool SAL_CALL MacabDatabaseMetaData::supportsLimitedOuterJoins( ) sal_Int32 SAL_CALL MacabDatabaseMetaData::getMaxColumnsInGroupBy( ) { - sal_Int32 nValue = 0; // 0 means no limit - return nValue; + return 0; // 0 means no limit } sal_Int32 SAL_CALL MacabDatabaseMetaData::getMaxColumnsInOrderBy( ) { - sal_Int32 nValue = 0; // 0 means no limit - return nValue; + return 0; // 0 means no limit } sal_Int32 SAL_CALL MacabDatabaseMetaData::getMaxColumnsInSelect( ) { - sal_Int32 nValue = 0; // 0 means no limit - return nValue; + return 0; // 0 means no limit } sal_Int32 SAL_CALL MacabDatabaseMetaData::getMaxUserNameLength( ) { - sal_Int32 nValue = 0; // 0 means no limit - return nValue; + return 0; // 0 means no limit } sal_Bool SAL_CALL MacabDatabaseMetaData::supportsResultSetType( sal_Int32 setType ) diff --git a/connectivity/source/drivers/macab/MacabResultSet.cxx b/connectivity/source/drivers/macab/MacabResultSet.cxx index 505208f1b6f6..ec72d269a7a8 100644 --- a/connectivity/source/drivers/macab/MacabResultSet.cxx +++ b/connectivity/source/drivers/macab/MacabResultSet.cxx @@ -246,8 +246,7 @@ sal_Int8 SAL_CALL MacabResultSet::getByte(sal_Int32) ::dbtools::throwFunctionNotSupportedSQLException("getByte", nullptr); - sal_Int8 nRet = 0; - return nRet; + return 0; } sal_Int16 SAL_CALL MacabResultSet::getShort(sal_Int32) @@ -257,8 +256,7 @@ sal_Int16 SAL_CALL MacabResultSet::getShort(sal_Int32) ::dbtools::throwFunctionNotSupportedSQLException("getShort", nullptr); - sal_Int16 nRet = 0; - return nRet; + return 0; } sal_Int32 SAL_CALL MacabResultSet::getInt(sal_Int32 columnIndex) diff --git a/connectivity/source/drivers/macab/MacabStatement.cxx b/connectivity/source/drivers/macab/MacabStatement.cxx index 721bbe36c087..208c75cc0130 100644 --- a/connectivity/source/drivers/macab/MacabStatement.cxx +++ b/connectivity/source/drivers/macab/MacabStatement.cxx @@ -526,9 +526,8 @@ sal_Bool MacabCommonStatement::convertFastPropertyValue( sal_Int32, const Any&) { - bool bConverted = false; // here we have to try to convert - return bConverted; + return false; } void MacabCommonStatement::setFastPropertyValue_NoBroadcast(sal_Int32 nHandle,const Any&) |