summaryrefslogtreecommitdiff
path: root/include/tools/stream.hxx
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2018-01-10 12:30:15 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2018-01-11 12:47:37 +0100
commite57a036939e27ecd173ace691689e26a6a33df8e (patch)
treea36d589da272c4732cddb4ca0548cdb5dcb2b2bd /include/tools/stream.hxx
parentcb5d79b504aa8575ea15c777707c7465ea43cb07 (diff)
loplugin:useuniqueptr in tools,stoc,unotools
Change-Id: Ia72b65577143623cedc7a40bc34f7fb897add097 Reviewed-on: https://gerrit.libreoffice.org/47726 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'include/tools/stream.hxx')
-rw-r--r--include/tools/stream.hxx7
1 files changed, 5 insertions, 2 deletions
diff --git a/include/tools/stream.hxx b/include/tools/stream.hxx
index 640dca026598..cb211ddba607 100644
--- a/include/tools/stream.hxx
+++ b/include/tools/stream.hxx
@@ -26,6 +26,7 @@
#include <vcl/errcode.hxx>
#include <rtl/string.hxx>
#include <o3tl/typed_flags_set.hxx>
+#include <memory>
class StreamData;
@@ -143,7 +144,8 @@ private:
sal_uInt64 m_nActPos;
// buffer management
- sal_uInt8* m_pRWBuf; ///< Points to read/write buffer
+ std::unique_ptr<sal_uInt8>
+ m_pRWBuf; ///< Points to read/write buffer
sal_uInt8* m_pBufPos; ///< m_pRWBuf + m_nBufActualPos
sal_uInt16 m_nBufSize; ///< Allocated size of buffer
sal_uInt16 m_nBufActualLen; ///< Length of used segment of puffer
@@ -582,7 +584,8 @@ TOOLS_DLLPUBLIC bool checkSeek(SvStream &rSt, sal_uInt64 nOffset) SAL_WARN_UNUSE
class TOOLS_DLLPUBLIC SvFileStream : public SvStream
{
private:
- StreamData* pInstanceData;
+ std::unique_ptr<StreamData>
+ pInstanceData;
OUString aFilename;
#if defined(_WIN32)
sal_uInt16 nLockCounter;