summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2017-06-26 09:41:14 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2017-06-27 08:42:36 +0200
commit513ac8eb79e45de332d7ddab5b27c70578b904f1 (patch)
tree46f35b236d75651eb612a088e2cdfd48aa85a21c /include
parent72b706d7def9e4805e35f3174170dad422b2e7f8 (diff)
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 <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'include')
-rw-r--r--include/svl/zformat.hxx5
-rw-r--r--include/svtools/ctrltool.hxx3
-rw-r--r--include/tools/inetstrm.hxx3
3 files changed, 7 insertions, 4 deletions
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 <i18nlangtag/mslangid.hxx>
#include <svl/zforlist.hxx>
#include <svl/nfkeytab.hxx>
+#include <vector>
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<OUString> sStrArray; // Array of symbols
+ std::vector<short> 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<sal_IntPtr[]>
+ mpSizeAry;
VclPtr<OutputDevice> mpDev;
VclPtr<OutputDevice> mpDev2;
std::vector<std::unique_ptr<ImplFontListNameInfo>> 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 <tools/toolsdllapi.h>
#include <tools/stream.hxx>
#include <sal/types.h>
+#include <vector>
class INetMIMEMessage;
class SvStream;
@@ -31,7 +32,7 @@ class TOOLS_DLLPUBLIC INetMIMEMessageStream
INetMIMEMessage *pSourceMsg;
bool bHeaderGenerated;
- sal_Char *pBuffer;
+ std::vector<sal_Char> mvBuffer;
sal_Char *pRead;
sal_Char *pWrite;