summaryrefslogtreecommitdiff
path: root/include/package
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2018-04-16 12:06:48 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2018-04-23 08:14:07 +0200
commit7e937a13840129b1aba0ffcc560dc07e891ebe09 (patch)
treed34dccc224deaab034588a244d94ac7aa27d9f0c /include/package
parent18c2742946a745d5311a1c26bda352cefc6c1ac0 (diff)
loplugin:useuniqueptr in Inflater,Deflater
Change-Id: I55833664a6e76d781908b8f1f721dd9a4946e35f Reviewed-on: https://gerrit.libreoffice.org/53224 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'include/package')
-rw-r--r--include/package/Deflater.hxx3
-rw-r--r--include/package/Inflater.hxx3
2 files changed, 4 insertions, 2 deletions
diff --git a/include/package/Deflater.hxx b/include/package/Deflater.hxx
index 9d88997f5be6..2ecb7636ff19 100644
--- a/include/package/Deflater.hxx
+++ b/include/package/Deflater.hxx
@@ -22,6 +22,7 @@
#include <com/sun/star/uno/Sequence.hxx>
#include <package/packagedllapi.hxx>
+#include <memory>
struct z_stream_s;
@@ -35,7 +36,7 @@ class DLLPUBLIC_PACKAGE Deflater final
bool bFinish;
bool bFinished;
sal_Int64 nOffset, nLength;
- z_stream* pStream;
+ std::unique_ptr<z_stream> pStream;
void init (sal_Int32 nLevel, bool bNowrap);
sal_Int32 doDeflateBytes (css::uno::Sequence < sal_Int8 > &rBuffer, sal_Int32 nNewOffset, sal_Int32 nNewLength);
diff --git a/include/package/Inflater.hxx b/include/package/Inflater.hxx
index ebec98734f3f..1e3892f83d75 100644
--- a/include/package/Inflater.hxx
+++ b/include/package/Inflater.hxx
@@ -22,6 +22,7 @@
#include <com/sun/star/uno/Sequence.hxx>
#include <package/packagedllapi.hxx>
+#include <memory>
struct z_stream_s;
@@ -33,7 +34,7 @@ class DLLPUBLIC_PACKAGE Inflater final
bool bFinished, bNeedDict;
sal_Int32 nOffset, nLength, nLastInflateError;
- z_stream* pStream;
+ std::unique_ptr<z_stream> pStream;
css::uno::Sequence < sal_Int8 > sInBuffer;
sal_Int32 doInflateBytes (css::uno::Sequence < sal_Int8 > &rBuffer, sal_Int32 nNewOffset, sal_Int32 nNewLength);