From 7e73c033a128403bdeeb8be323e43ba2c7c8f8b4 Mon Sep 17 00:00:00 2001 From: Noel Grandin Date: Mon, 10 Jul 2017 09:47:35 +0200 Subject: loplugin:useuniqueptr in hwpfilter Change-Id: Id271fdb59cb0dedf2f180879d2116d11e45d68b3 Reviewed-on: https://gerrit.libreoffice.org/39739 Reviewed-by: Noel Grandin Tested-by: Noel Grandin --- hwpfilter/source/hbox.h | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) (limited to 'hwpfilter/source/hbox.h') diff --git a/hwpfilter/source/hbox.h b/hwpfilter/source/hbox.h index 8824a0911ded..5959e7def4d5 100644 --- a/hwpfilter/source/hbox.h +++ b/hwpfilter/source/hbox.h @@ -22,6 +22,7 @@ #include +#include #include #include @@ -81,14 +82,14 @@ struct DateCode; struct FieldCode : public HBox { uchar type[2]; /* 2/0 - Formula, 3/0-document summary, 3/1 Personal Information, 3/2-creation date, 4/0-pressing mold */ - char *reserved1; + std::array reserved1; unsigned short location_info; /* 0 - End code, 1 - start code */ - char *reserved2; - hchar *str1; - hchar *str2; - hchar *str3; + std::array reserved2; + std::unique_ptr str1; + std::unique_ptr str2; + std::unique_ptr str3; - DateCode *m_pDate; + std::unique_ptr m_pDate; FieldCode(); virtual ~FieldCode() override; @@ -357,7 +358,7 @@ struct TxtBox: public FBox */ short protect; //1=size lock - Cell *cell; + std::unique_ptr cell; Table *m_pTable; /** * Paragraph list @@ -629,7 +630,7 @@ struct Picture: public FBox /** * It's for the Drawing object */ - unsigned char *follow; /* When the type of image is drawing, gives additional information. */ + std::unique_ptr follow; /* When the type of image is drawing, gives additional information. */ bool ishyper; -- cgit