summaryrefslogtreecommitdiff
path: root/linguistic
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2017-01-16 14:16:55 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2017-01-17 06:41:54 +0000
commit90df5ee10727719aa1407ed4d1f06d7a790d6871 (patch)
treecac021b05b025d0e89c6beed20af4578cf34f437 /linguistic
parentd33d2a65a4ee54780ac005334bee176ddeec68fc (diff)
new loplugin: useuniqueptr: jvmfwk..sax
Change-Id: I732e2e22c6f953f0982fbc8833453e7c23cf9d49 Reviewed-on: https://gerrit.libreoffice.org/33166 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'linguistic')
-rw-r--r--linguistic/source/misc.cxx7
1 files changed, 3 insertions, 4 deletions
diff --git a/linguistic/source/misc.cxx b/linguistic/source/misc.cxx
index 6fe170c2800c..4ceb55b16bcb 100644
--- a/linguistic/source/misc.cxx
+++ b/linguistic/source/misc.cxx
@@ -124,8 +124,8 @@ static inline sal_Int32 Minimum( sal_Int32 n1, sal_Int32 n2, sal_Int32 n3 )
class IntArray2D
{
private:
- sal_Int32 *pData;
- int n1, n2;
+ std::unique_ptr<sal_Int32[]> pData;
+ int n1, n2;
public:
IntArray2D( int nDim1, int nDim2 );
@@ -138,12 +138,11 @@ IntArray2D::IntArray2D( int nDim1, int nDim2 )
{
n1 = nDim1;
n2 = nDim2;
- pData = new sal_Int32[n1 * n2];
+ pData.reset( new sal_Int32[n1 * n2] );
}
IntArray2D::~IntArray2D()
{
- delete[] pData;
}
sal_Int32 & IntArray2D::Value( int i, int k )