diff options
author | Noel Grandin <noel@peralex.com> | 2015-09-04 12:16:17 +0200 |
---|---|---|
committer | Björn Michaelsen <bjoern.michaelsen@canonical.com> | 2015-10-20 11:35:31 +0000 |
commit | 56e6f0da839c53867947d1e06f0e733022df7d0e (patch) | |
tree | bedad09b04f92578b067b62d51f160be9a389dd1 /connectivity | |
parent | 9e7e264bdf9459487037345917aea7b35de7e7a0 (diff) |
new loplugin: badvectorinit
look for places calling the 1-argument vector fill constructor and then
immediately called push_back, which is generally a sign that its
leaving empty slots.
Change-Id: I34e69b8d09cc48c0d409499faaf192b9f86bc517
Reviewed-on: https://gerrit.libreoffice.org/17525
Reviewed-by: Björn Michaelsen <bjoern.michaelsen@canonical.com>
Tested-by: Björn Michaelsen <bjoern.michaelsen@canonical.com>
Diffstat (limited to 'connectivity')
3 files changed, 4 insertions, 4 deletions
diff --git a/connectivity/source/drivers/calc/CDatabaseMetaData.cxx b/connectivity/source/drivers/calc/CDatabaseMetaData.cxx index dc15b2b25948..1cf99631b348 100644 --- a/connectivity/source/drivers/calc/CDatabaseMetaData.cxx +++ b/connectivity/source/drivers/calc/CDatabaseMetaData.cxx @@ -399,7 +399,7 @@ Reference< XResultSet > SAL_CALL OCalcDatabaseMetaData::getTables( OUString aName = aSheetNames[nSheet]; if ( !lcl_IsEmptyOrHidden( xSheets, aName ) && match(tableNamePattern,aName,'\0') ) { - ODatabaseMetaDataResultSet::ORow aRow(3); + ODatabaseMetaDataResultSet::ORow aRow { NULL, NULL, NULL }; aRow.reserve(6); aRow.push_back(new ORowSetValueDecorator(aName)); aRow.push_back(new ORowSetValueDecorator(aTable)); @@ -424,7 +424,7 @@ Reference< XResultSet > SAL_CALL OCalcDatabaseMetaData::getTables( OUString aName = aDBNames[nRange]; if ( !lcl_IsUnnamed( xRanges, aName ) && match(tableNamePattern,aName,'\0') ) { - ODatabaseMetaDataResultSet::ORow aRow(3); + ODatabaseMetaDataResultSet::ORow aRow { NULL, NULL, NULL }; aRow.reserve(6); aRow.push_back(new ORowSetValueDecorator(aName)); aRow.push_back(new ORowSetValueDecorator(aTable)); diff --git a/connectivity/source/drivers/file/FDatabaseMetaData.cxx b/connectivity/source/drivers/file/FDatabaseMetaData.cxx index f75db5a41e68..ecc80c022ef1 100644 --- a/connectivity/source/drivers/file/FDatabaseMetaData.cxx +++ b/connectivity/source/drivers/file/FDatabaseMetaData.cxx @@ -225,7 +225,7 @@ Reference< XResultSet > SAL_CALL ODatabaseMetaData::getTables( aURL.SetSmartURL( sUrl ); sThisContentExtension = aURL.getExtension(); - ODatabaseMetaDataResultSet::ORow aRow(3); + ODatabaseMetaDataResultSet::ORow aRow { NULL, NULL, NULL }; aRow.reserve(6); bool bNewRow = false; diff --git a/connectivity/source/drivers/mork/MDatabaseMetaDataHelper.cxx b/connectivity/source/drivers/mork/MDatabaseMetaDataHelper.cxx index f04f2bf84360..9d6c4e937c25 100644 --- a/connectivity/source/drivers/mork/MDatabaseMetaDataHelper.cxx +++ b/connectivity/source/drivers/mork/MDatabaseMetaDataHelper.cxx @@ -106,7 +106,7 @@ bool MDatabaseMetaDataHelper::getTables( OConnection* _pCon, return false; for ( size_t i = 0; i < tables.size(); i++ ) { - ODatabaseMetaDataResultSet::ORow aRow(3); + ODatabaseMetaDataResultSet::ORow aRow { NULL, NULL, NULL }; OUString aTableName = tables[i]; SAL_INFO("connectivity.mork", "TableName: " << aTableName ); |