From 513ac8eb79e45de332d7ddab5b27c70578b904f1 Mon Sep 17 00:00:00 2001 From: Noel Grandin Date: Mon, 26 Jun 2017 09:41:14 +0200 Subject: loplugin:useuniqueptr in various extending it to find places we can use std::unique_ptr on arrays Change-Id: I9feb1d12d738d6931e752ecb6dd51cbc1540c81b Reviewed-on: https://gerrit.libreoffice.org/39255 Tested-by: Jenkins Reviewed-by: Noel Grandin --- include/svl/zformat.hxx | 5 +++-- include/svtools/ctrltool.hxx | 3 ++- include/tools/inetstrm.hxx | 3 ++- 3 files changed, 7 insertions(+), 4 deletions(-) (limited to 'include') diff --git a/include/svl/zformat.hxx b/include/svl/zformat.hxx index e10060c04240..7e358d0c096a 100644 --- a/include/svl/zformat.hxx +++ b/include/svl/zformat.hxx @@ -23,6 +23,7 @@ #include #include #include +#include namespace utl { class DigitGroupingIterator; @@ -48,8 +49,8 @@ enum SvNumberformatLimitOps struct ImpSvNumberformatInfo // Struct for FormatInfo { - OUString* sStrArray; // Array of symbols - short* nTypeArray; // Array of infos + std::vector sStrArray; // Array of symbols + std::vector nTypeArray; // Array of infos sal_uInt16 nThousand; // Count of group separator sequences sal_uInt16 nCntPre; // Count of digits before decimal point sal_uInt16 nCntPost; // Count of digits after decimal point diff --git a/include/svtools/ctrltool.hxx b/include/svtools/ctrltool.hxx index 3b11eac75e36..4c642df4be47 100644 --- a/include/svtools/ctrltool.hxx +++ b/include/svtools/ctrltool.hxx @@ -144,7 +144,8 @@ private: OUString maBoldItalic; OUString maBlack; OUString maBlackItalic; - sal_IntPtr* mpSizeAry; + mutable std::unique_ptr + mpSizeAry; VclPtr mpDev; VclPtr mpDev2; std::vector> m_Entries; diff --git a/include/tools/inetstrm.hxx b/include/tools/inetstrm.hxx index d09aa94fb4d3..ba6f6aa14744 100644 --- a/include/tools/inetstrm.hxx +++ b/include/tools/inetstrm.hxx @@ -22,6 +22,7 @@ #include #include #include +#include class INetMIMEMessage; class SvStream; @@ -31,7 +32,7 @@ class TOOLS_DLLPUBLIC INetMIMEMessageStream INetMIMEMessage *pSourceMsg; bool bHeaderGenerated; - sal_Char *pBuffer; + std::vector mvBuffer; sal_Char *pRead; sal_Char *pWrite; -- cgit