summaryrefslogtreecommitdiffstats
path: root/hwpfilter/source/drawing.h
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2018-01-16 14:02:57 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2018-01-19 08:58:46 +0200
commit96c85e7d107ad0d79295349f01cd8578ce7daeba (patch)
treec205fda67414559b325ab94b8e8dfff753d9ee4c /hwpfilter/source/drawing.h
parentloplugin:useuniqueptr in idl (diff)
downloadcore-96c85e7d107ad0d79295349f01cd8578ce7daeba.tar.gz
core-96c85e7d107ad0d79295349f01cd8578ce7daeba.zip
loplugin:useuniqueptr in hwpfilter
Change-Id: Id276015425ea7de3cf55b9ef21b4e7ce54c2ce47
Diffstat (limited to 'hwpfilter/source/drawing.h')
-rw-r--r--hwpfilter/source/drawing.h10
1 files changed, 2 insertions, 8 deletions
diff --git a/hwpfilter/source/drawing.h b/hwpfilter/source/drawing.h
index 64abf44a67d7..806a48748bf7 100644
--- a/hwpfilter/source/drawing.h
+++ b/hwpfilter/source/drawing.h
@@ -355,7 +355,7 @@ static HWPDrawingObject *LoadDrawingObject(void)
}
if (link_info & HDOFILE_HAS_CHILD)
{
- hdo->child = LoadDrawingObject();
+ hdo->child.reset( LoadDrawingObject() );
if (hdo->child == nullptr)
{
goto error;
@@ -364,7 +364,7 @@ static HWPDrawingObject *LoadDrawingObject(void)
if (prev == nullptr)
head = hdo;
else
- prev->next = hdo;
+ prev->next.reset( hdo );
prev = hdo;
}
while (link_info & HDOFILE_HAS_NEXT);
@@ -682,12 +682,6 @@ HWPDrawingObject::HWPDrawingObject()
HWPDrawingObject::~HWPDrawingObject()
{
- if (child)
- delete child;
-
- if (next)
- delete next;
-
if (property.pPara)
FreeParaList(property.pPara);