diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2015-10-21 09:19:34 +0200 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2015-10-21 09:19:34 +0200 |
commit | 3ba2568194241acd1a2b5cae2a700f6b5a6fcd7d (patch) | |
tree | c0ce81b7b885334eb2bbb9f95ebb5fa0c162656f /connectivity | |
parent | 7180887981f9f417d4b9e75e196ee2cf500c1aac (diff) |
loplugin:badvectorinit
Change-Id: I3fa3e83e67b5ba017bbd2a33edaf41207e5fe96f
Diffstat (limited to 'connectivity')
-rw-r--r-- | connectivity/source/drivers/evoab2/NDatabaseMetaData.cxx | 24 |
1 files changed, 14 insertions, 10 deletions
diff --git a/connectivity/source/drivers/evoab2/NDatabaseMetaData.cxx b/connectivity/source/drivers/evoab2/NDatabaseMetaData.cxx index e510395ad335..d4bccf917b40 100644 --- a/connectivity/source/drivers/evoab2/NDatabaseMetaData.cxx +++ b/connectivity/source/drivers/evoab2/NDatabaseMetaData.cxx @@ -1153,15 +1153,17 @@ Reference< XResultSet > SAL_CALL OEvoabDatabaseMetaData::getTables( if (!can) continue; - ODatabaseMetaDataResultSet::ORow aRow(3); - aRow.reserve(6); OUString aHumanName = OStringToOUString( e_source_get_display_name( pSource ), RTL_TEXTENCODING_UTF8 ); - aRow.push_back(new ORowSetValueDecorator(aHumanName)); //tablename - aRow.push_back(new ORowSetValueDecorator(aTable)); OUString aUID = OStringToOUString( e_source_get_uid( pSource ), RTL_TEXTENCODING_UTF8 ); - aRow.push_back(new ORowSetValueDecorator(aUID)); //comment + ODatabaseMetaDataResultSet::ORow aRow{ + ORowSetValueDecoratorRef(), + ORowSetValueDecoratorRef(), + ORowSetValueDecoratorRef(), + new ORowSetValueDecorator(aHumanName), //tablename + new ORowSetValueDecorator(aTable), + new ORowSetValueDecorator(aUID)}; //comment //I'd prefer to swap the comment and the human name and //just use e_source_registry_ref_source(get_e_source_registry(), aUID); //in open book rather than search for the name again @@ -1210,11 +1212,13 @@ Reference< XResultSet > SAL_CALL OEvoabDatabaseMetaData::getTables( OUString aName = OStringToOUString( e_source_peek_name( pSource ), RTL_TEXTENCODING_UTF8 ); - ODatabaseMetaDataResultSet::ORow aRow(3); - aRow.reserve(6); - aRow.push_back(new ORowSetValueDecorator(aName)); - aRow.push_back(new ORowSetValueDecorator(aTable)); - aRow.push_back(ODatabaseMetaDataResultSet::getEmptyValue()); + ODatabaseMetaDataResultSet::ORow aRow{ + ORowSetValueDecoratorRef(), + ORowSetValueDecoratorRef(), + ORowSetValueDecoratorRef(), + new ORowSetValueDecorator(aName), + new ORowSetValueDecorator(aTable), + ODatabaseMetaDataResultSet::getEmptyValue()}; aRows.push_back(aRow); } } |