[Libreoffice-commits] core.git: connectivity/source
Stephan Bergmann
sbergman at redhat.com
Wed Oct 21 00:20:10 PDT 2015
connectivity/source/drivers/evoab2/NDatabaseMetaData.cxx | 24 ++++++++-------
1 file changed, 14 insertions(+), 10 deletions(-)
New commits:
commit 3ba2568194241acd1a2b5cae2a700f6b5a6fcd7d
Author: Stephan Bergmann <sbergman at redhat.com>
Date: Wed Oct 21 09:19:34 2015 +0200
loplugin:badvectorinit
Change-Id: I3fa3e83e67b5ba017bbd2a33edaf41207e5fe96f
diff --git a/connectivity/source/drivers/evoab2/NDatabaseMetaData.cxx b/connectivity/source/drivers/evoab2/NDatabaseMetaData.cxx
index e510395..d4bccf9 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);
}
}
More information about the Libreoffice-commits
mailing list