diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2018-05-03 13:48:14 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2018-05-07 08:30:53 +0200 |
commit | 7baed0c028df4b5215557e8410467277d068021b (patch) | |
tree | 8a822d25bcaa1ccb8d0d86abb3368f18953a9eb8 /connectivity/source/drivers/file | |
parent | e2b72039c619b64235fc7cbf12ac40b6b968f984 (diff) |
loplugin:useuniqueptr in OFileTable
Change-Id: I74f21220b71703a18d1ae85f5f50397355304153
Reviewed-on: https://gerrit.libreoffice.org/53863
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'connectivity/source/drivers/file')
-rw-r--r-- | connectivity/source/drivers/file/FTable.cxx | 9 |
1 files changed, 1 insertions, 8 deletions
diff --git a/connectivity/source/drivers/file/FTable.cxx b/connectivity/source/drivers/file/FTable.cxx index 6358874f93f7..e583e20db9af 100644 --- a/connectivity/source/drivers/file/FTable.cxx +++ b/connectivity/source/drivers/file/FTable.cxx @@ -40,7 +40,6 @@ OFileTable::OFileTable(sdbcx::OCollection* _pTables,OConnection* _pConnection) ,m_pConnection(_pConnection) ,m_pFileStream(nullptr) ,m_nFilePos(0) - ,m_pBuffer(nullptr) ,m_nBufferSize(0) ,m_bWriteable(false) { @@ -63,7 +62,6 @@ OFileTable::OFileTable( sdbcx::OCollection* _pTables,OConnection* _pConnection, , m_pConnection(_pConnection) , m_pFileStream(nullptr) , m_nFilePos(0) - , m_pBuffer(nullptr) , m_nBufferSize(0) , m_bWriteable(false) { @@ -156,12 +154,7 @@ void OFileTable::FileClose() m_pFileStream->Flush(); m_pFileStream.reset(); - - if (m_pBuffer) - { - delete[] m_pBuffer; - m_pBuffer = nullptr; - } + m_pBuffer.reset(); } bool OFileTable::InsertRow(OValueRefVector& /*rRow*/, const css::uno::Reference< css::container::XIndexAccess>& /*_xCols*/) |