summaryrefslogtreecommitdiff
path: root/hwpfilter/source/hwpfile.cxx
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2018-08-20 13:49:28 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2018-08-21 12:11:18 +0200
commitc4558e4b7b3defe7a128e16781eaececc416195a (patch)
tree1aacd34300ad3dca8e551e1110bc8b771bf96625 /hwpfilter/source/hwpfile.cxx
parent079abbaefa0ce600958e8e6a2b15c58deec14990 (diff)
loplugin:useuniqueptr in HStreamIODev
Change-Id: I81ab91bce2a83603b25922593c1fd764b5c0b003 Reviewed-on: https://gerrit.libreoffice.org/59358 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'hwpfilter/source/hwpfile.cxx')
-rw-r--r--hwpfilter/source/hwpfile.cxx8
1 files changed, 4 insertions, 4 deletions
diff --git a/hwpfilter/source/hwpfile.cxx b/hwpfilter/source/hwpfile.cxx
index d3bd660e77fd..a61b3e08921b 100644
--- a/hwpfilter/source/hwpfile.cxx
+++ b/hwpfilter/source/hwpfile.cxx
@@ -65,9 +65,9 @@ HWPFile::~HWPFile()
hiodev.reset();
}
-int HWPFile::ReadHwpFile(HStream * stream)
+int HWPFile::ReadHwpFile(std::unique_ptr<HStream> stream)
{
- if (Open(stream) != HWP_NoError)
+ if (Open(std::move(stream)) != HWP_NoError)
return State();
InfoRead();
FontRead();
@@ -92,9 +92,9 @@ int detect_hwp_version(const char *str)
// HIODev wrapper
-int HWPFile::Open(HStream * stream)
+int HWPFile::Open(std::unique_ptr<HStream> stream)
{
- HStreamIODev *hstreamio = new HStreamIODev(stream);
+ HStreamIODev *hstreamio = new HStreamIODev(std::move(stream));
if (!hstreamio->open())
{