summaryrefslogtreecommitdiff
path: root/connectivity/source/drivers/evoab2
diff options
context:
space:
mode:
Diffstat (limited to 'connectivity/source/drivers/evoab2')
-rw-r--r--connectivity/source/drivers/evoab2/EApi.cxx4
-rw-r--r--connectivity/source/drivers/evoab2/NDatabaseMetaData.cxx12
2 files changed, 7 insertions, 9 deletions
diff --git a/connectivity/source/drivers/evoab2/EApi.cxx b/connectivity/source/drivers/evoab2/EApi.cxx
index 1830cae593af..41bc62c9ab20 100644
--- a/connectivity/source/drivers/evoab2/EApi.cxx
+++ b/connectivity/source/drivers/evoab2/EApi.cxx
@@ -173,9 +173,7 @@ bool EApiInit()
ESourceRegistry *get_e_source_registry()
{
- static ESourceRegistry *theInstance;
- if (!theInstance)
- theInstance = e_source_registry_new_sync(nullptr, nullptr);
+ static ESourceRegistry *theInstance = e_source_registry_new_sync(nullptr, nullptr);
return theInstance;
}
diff --git a/connectivity/source/drivers/evoab2/NDatabaseMetaData.cxx b/connectivity/source/drivers/evoab2/NDatabaseMetaData.cxx
index ff48493e1f20..004b46245b4d 100644
--- a/connectivity/source/drivers/evoab2/NDatabaseMetaData.cxx
+++ b/connectivity/source/drivers/evoab2/NDatabaseMetaData.cxx
@@ -1017,10 +1017,9 @@ Reference< XResultSet > OEvoabDatabaseMetaData::impl_getTypeInfo_throw( )
ODatabaseMetaDataResultSet* pResultSet = new ODatabaseMetaDataResultSet(ODatabaseMetaDataResultSet::eTypeInfo);
Reference< XResultSet > xResultSet = pResultSet;
- static ODatabaseMetaDataResultSet::ORows aRows;
-
- if(aRows.empty())
+ static ODatabaseMetaDataResultSet::ORows aRows = []()
{
+ ODatabaseMetaDataResultSet::ORows tmp;
ODatabaseMetaDataResultSet::ORow aRow;
aRow.reserve(19);
aRow.push_back(ODatabaseMetaDataResultSet::getEmptyValue());
@@ -1044,13 +1043,14 @@ Reference< XResultSet > OEvoabDatabaseMetaData::impl_getTypeInfo_throw( )
aRow.push_back(ODatabaseMetaDataResultSet::getEmptyValue());
aRow.push_back(new ORowSetValueDecorator(sal_Int32(10)));
- aRows.push_back(aRow);
+ tmp.push_back(aRow);
aRow[1] = new ORowSetValueDecorator(OUString("VARCHAR"));
aRow[2] = new ORowSetValueDecorator(DataType::VARCHAR);
aRow[3] = new ORowSetValueDecorator(sal_Int32(65535));
- aRows.push_back(aRow);
- }
+ tmp.push_back(aRow);
+ return tmp;
+ }();
pResultSet->setRows(aRows);
return xResultSet;
}