summaryrefslogtreecommitdiff
path: root/connectivity/source/sdbcx/VTable.cxx
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2018-01-29 13:28:44 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2018-02-05 12:04:36 +0100
commit5c7b954935369cbbd22a6f43be63ac7c0ddbbfdc (patch)
treeac1ee3ab5e080ab65ceef2630d247d9fbe288fbb /connectivity/source/sdbcx/VTable.cxx
parent68d9583db4226a61ba23398928b9416c5d8745c8 (diff)
loplugin:useuniqueptr in OTable
use rtl::Reference here since these are reference counted data structures, and we hand out references to me via our API Change-Id: I8f69dde2db08519cb3d9de20b4ad54462e3ecc98 Reviewed-on: https://gerrit.libreoffice.org/49180 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'connectivity/source/sdbcx/VTable.cxx')
-rw-r--r--connectivity/source/sdbcx/VTable.cxx33
1 files changed, 12 insertions, 21 deletions
diff --git a/connectivity/source/sdbcx/VTable.cxx b/connectivity/source/sdbcx/VTable.cxx
index 26e2db8b507f..371a28ecf54e 100644
--- a/connectivity/source/sdbcx/VTable.cxx
+++ b/connectivity/source/sdbcx/VTable.cxx
@@ -68,9 +68,6 @@ OTable::OTable(OCollection* _pTables,
bool _bCase)
: OTableDescriptor_BASE(m_aMutex)
,ODescriptor(OTableDescriptor_BASE::rBHelper,_bCase,true)
- ,m_pKeys(nullptr)
- ,m_pColumns(nullptr)
- ,m_pIndexes(nullptr)
,m_pTables(_pTables)
{
}
@@ -85,9 +82,6 @@ OTable::OTable( OCollection* _pTables,
,m_SchemaName(SchemaName)
,m_Description(Description)
,m_Type(Type)
- ,m_pKeys(nullptr)
- ,m_pColumns(nullptr)
- ,m_pIndexes(nullptr)
,m_pTables(_pTables)
{
m_Name = Name;
@@ -95,9 +89,6 @@ OTable::OTable( OCollection* _pTables,
OTable::~OTable()
{
- delete m_pKeys;
- delete m_pColumns;
- delete m_pIndexes;
}
void OTable::construct()
@@ -151,12 +142,12 @@ void SAL_CALL OTable::disposing()
::osl::MutexGuard aGuard(m_aMutex);
- if(m_pKeys)
- m_pKeys->disposing();
- if(m_pColumns)
- m_pColumns->disposing();
- if(m_pIndexes)
- m_pIndexes->disposing();
+ if(m_xKeys)
+ m_xKeys->disposing();
+ if(m_xColumns)
+ m_xColumns->disposing();
+ if(m_xIndexes)
+ m_xIndexes->disposing();
m_pTables = nullptr;
}
@@ -169,7 +160,7 @@ Reference< XNameAccess > SAL_CALL OTable::getColumns( )
try
{
- if ( !m_pColumns )
+ if ( !m_xColumns )
refreshColumns();
}
catch( const RuntimeException& )
@@ -182,7 +173,7 @@ Reference< XNameAccess > SAL_CALL OTable::getColumns( )
// allowed
}
- return m_pColumns;
+ return m_xColumns.get();
}
@@ -196,9 +187,9 @@ Reference< XIndexAccess > SAL_CALL OTable::getKeys( )
try
{
- if ( !m_pKeys )
+ if ( !m_xKeys )
refreshKeys();
- xKeys = m_pKeys;
+ xKeys = m_xKeys.get();
}
catch( const RuntimeException& )
{
@@ -241,7 +232,7 @@ Reference< XNameAccess > SAL_CALL OTable::getIndexes( )
try
{
- if ( !m_pIndexes )
+ if ( !m_xIndexes )
refreshIndexes();
}
catch( const RuntimeException& )
@@ -254,7 +245,7 @@ Reference< XNameAccess > SAL_CALL OTable::getIndexes( )
// allowed
}
- return m_pIndexes;
+ return m_xIndexes.get();
}
// XRename