From e57a036939e27ecd173ace691689e26a6a33df8e Mon Sep 17 00:00:00 2001 From: Noel Grandin Date: Wed, 10 Jan 2018 12:30:15 +0200 Subject: loplugin:useuniqueptr in tools,stoc,unotools Change-Id: Ia72b65577143623cedc7a40bc34f7fb897add097 Reviewed-on: https://gerrit.libreoffice.org/47726 Tested-by: Jenkins Reviewed-by: Noel Grandin --- include/tools/stream.hxx | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'include/tools/stream.hxx') 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 #include #include +#include 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 + 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 + pInstanceData; OUString aFilename; #if defined(_WIN32) sal_uInt16 nLockCounter; -- cgit