summaryrefslogtreecommitdiff
path: root/io/source/stm/omark.cxx
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2017-01-16 14:15:13 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2017-01-17 08:34:42 +0000
commit7a60e90ef05c84923f83882efc01c33fef1ed305 (patch)
tree4c49f1ab14fda2a79e0d8efdb731d4d6fe924eba /io/source/stm/omark.cxx
parenta9367c1b39600d5a5e2d0067113f06ad59cc37a1 (diff)
new loplugin: useuniqueptr: helpcompiler..io
Change-Id: I6b394163c144e6b5540cb160abb613d56fe327de Reviewed-on: https://gerrit.libreoffice.org/33165 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'io/source/stm/omark.cxx')
-rw-r--r--io/source/stm/omark.cxx12
1 files changed, 3 insertions, 9 deletions
diff --git a/io/source/stm/omark.cxx b/io/source/stm/omark.cxx
index 9cb1fa402001..31d07604cbf0 100644
--- a/io/source/stm/omark.cxx
+++ b/io/source/stm/omark.cxx
@@ -19,6 +19,7 @@
#include <map>
+#include <memory>
#include <vector>
#include <com/sun/star/io/XMarkableStream.hpp>
@@ -75,7 +76,6 @@ class OMarkableOutputStream :
{
public:
OMarkableOutputStream( );
- virtual ~OMarkableOutputStream() override;
public: // XOutputStream
virtual void SAL_CALL writeBytes(const Sequence< sal_Int8 >& aData)
@@ -138,7 +138,7 @@ private:
Reference< XOutputStream > m_output;
bool m_bValidStream;
- MemRingBuffer *m_pBuffer;
+ std::unique_ptr<MemRingBuffer> m_pBuffer;
map<sal_Int32,sal_Int32,less< sal_Int32 > > m_mapMarks;
sal_Int32 m_nCurrentPos;
sal_Int32 m_nCurrentMark;
@@ -148,18 +148,12 @@ private:
OMarkableOutputStream::OMarkableOutputStream( )
: m_bValidStream(false)
+ , m_pBuffer( new MemRingBuffer )
, m_nCurrentPos(0)
, m_nCurrentMark(0)
{
- m_pBuffer = new MemRingBuffer;
-}
-
-OMarkableOutputStream::~OMarkableOutputStream()
-{
- delete m_pBuffer;
}
-
// XOutputStream
void OMarkableOutputStream::writeBytes(const Sequence< sal_Int8 >& aData)
throw ( NotConnectedException,