summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJulien Nabet <serval2412@yahoo.fr>2023-12-22 15:20:54 +0100
committerJulien Nabet <serval2412@yahoo.fr>2023-12-22 16:50:14 +0100
commit3001179cb72a98c14acc6ef8323eebadf526f71b (patch)
treee96967673b93ce814795055703bf11c889510e0e
parentdc323680b9c82527eeef3bc69ac4ebf978cac69f (diff)
Simplify initialization by avoiding push_back
Change-Id: I62a2986dd21f37df71653c94223a3dce5d50dff0 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/161180 Tested-by: Jenkins Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
-rw-r--r--connectivity/source/drivers/writer/WDatabaseMetaData.cxx11
1 files changed, 6 insertions, 5 deletions
diff --git a/connectivity/source/drivers/writer/WDatabaseMetaData.cxx b/connectivity/source/drivers/writer/WDatabaseMetaData.cxx
index f944d86a7fa9..1eed92ddcf07 100644
--- a/connectivity/source/drivers/writer/WDatabaseMetaData.cxx
+++ b/connectivity/source/drivers/writer/WDatabaseMetaData.cxx
@@ -93,11 +93,12 @@ uno::Reference<sdbc::XResultSet> SAL_CALL OWriterDatabaseMetaData::getTables(
const OUString& rName = aTableNames[nTable];
if (match(tableNamePattern, rName, '\0'))
{
- ODatabaseMetaDataResultSet::ORow aRow{ nullptr, nullptr, nullptr };
- aRow.reserve(6);
- aRow.push_back(new ORowSetValueDecorator(rName));
- aRow.push_back(new ORowSetValueDecorator(aTable));
- aRow.push_back(ODatabaseMetaDataResultSet::getEmptyValue());
+ ODatabaseMetaDataResultSet::ORow aRow{ nullptr,
+ nullptr,
+ nullptr,
+ new ORowSetValueDecorator(rName),
+ new ORowSetValueDecorator(aTable),
+ ODatabaseMetaDataResultSet::getEmptyValue() };
aRows.push_back(aRow);
}
}