diff options
author | John Zhang <mywtfmp3@gmail.com> | 2020-01-11 13:16:17 +0800 |
---|---|---|
committer | Michael Stahl <michael.stahl@cib.de> | 2020-02-13 11:22:40 +0100 |
commit | 03d2fa836ebd5f8c05d1bda99c01be45a57b65ea (patch) | |
tree | 9d7c8bc05e0d6da8d6f94da289231a93c28ddb2c /connectivity | |
parent | a96ec04a07c35338f5f9a0cb361b9322e5ca9cec (diff) |
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>
Diffstat (limited to 'connectivity')
-rw-r--r-- | connectivity/source/drivers/dbase/DDriver.cxx | 25 |
1 files changed, 13 insertions, 12 deletions
diff --git a/connectivity/source/drivers/dbase/DDriver.cxx b/connectivity/source/drivers/dbase/DDriver.cxx index 3da4c0ce608c..ab2d52413e06 100644 --- a/connectivity/source/drivers/dbase/DDriver.cxx +++ b/connectivity/source/drivers/dbase/DDriver.cxx @@ -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; |