Prefer array over vector for 3 elements container

Change-Id: I3d9bb84e067fdda3486ee21cfd5b5ffa59bc8c5c
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/86591
Tested-by: Jenkins
Reviewed-by: Michael Stahl <michael.stahl@cib.de>
This commit is contained in:
John Zhang
2020-01-11 13:16:17 +08:00
committed by Michael Stahl
parent a96ec04a07
commit 03d2fa836e

View File

@@ -78,34 +78,35 @@ Sequence< DriverPropertyInfo > SAL_CALL ODriver::getPropertyInfo( const OUString
{
if ( acceptsURL(url) )
{
std::vector< DriverPropertyInfo > aDriverInfo;
Sequence< OUString > aBoolean(2);
aBoolean[0] = "0";
aBoolean[1] = "1";
aDriverInfo.push_back(DriverPropertyInfo(
DriverPropertyInfo aDriverInfo[] = {
{
"CharSet"
,"CharSet of the database."
,false
,OUString()
,Sequence< OUString >())
);
aDriverInfo.push_back(DriverPropertyInfo(
,Sequence< OUString >()
},
{
"ShowDeleted"
,"Display inactive records."
,false
,"0"
,aBoolean)
);
aDriverInfo.push_back(DriverPropertyInfo(
,aBoolean
},
{
"EnableSQL92Check"
,"Use SQL92 naming constraints."
,false
,"0"
,aBoolean)
);
return Sequence< DriverPropertyInfo >(aDriverInfo.data(),aDriverInfo.size());
,aBoolean
}
};
return Sequence< DriverPropertyInfo >(aDriverInfo, std::size(aDriverInfo));
}
SharedResources aResources;