summaryrefslogtreecommitdiff
path: root/vcl/source/bitmap/BitmapSobelGreyFilter.cxx
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2018-12-10 11:28:59 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2018-12-11 06:26:48 +0100
commit1cd32bcf1b92bd53320717626601135623dadd55 (patch)
tree5f33c3b070ac297bdba6bacb904d4ecd9644bef8 /vcl/source/bitmap/BitmapSobelGreyFilter.cxx
parent34d5e910adba4094bba1303284f9552028d0b019 (diff)
loplugin:useuniqueptr in vcl
Change-Id: I24eca813321fd3919bba9d37c285484f865ea2ea Reviewed-on: https://gerrit.libreoffice.org/64877 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'vcl/source/bitmap/BitmapSobelGreyFilter.cxx')
-rw-r--r--vcl/source/bitmap/BitmapSobelGreyFilter.cxx8
1 files changed, 4 insertions, 4 deletions
diff --git a/vcl/source/bitmap/BitmapSobelGreyFilter.cxx b/vcl/source/bitmap/BitmapSobelGreyFilter.cxx
index a631fe4f30a2..397d0e6d1d5c 100644
--- a/vcl/source/bitmap/BitmapSobelGreyFilter.cxx
+++ b/vcl/source/bitmap/BitmapSobelGreyFilter.cxx
@@ -49,8 +49,8 @@ BitmapEx BitmapSobelGreyFilter::execute(BitmapEx const& rBitmapEx) const
long nGrey11, nGrey12, nGrey13;
long nGrey21, nGrey22, nGrey23;
long nGrey31, nGrey32, nGrey33;
- long* pHMap = new long[nWidth + 2];
- long* pVMap = new long[nHeight + 2];
+ std::unique_ptr<long[]> pHMap(new long[nWidth + 2]);
+ std::unique_ptr<long[]> pVMap(new long[nHeight + 2]);
long nX, nY, nSum1, nSum2;
// fill mapping tables
@@ -139,8 +139,8 @@ BitmapEx BitmapSobelGreyFilter::execute(BitmapEx const& rBitmapEx) const
}
}
- delete[] pHMap;
- delete[] pVMap;
+ pHMap.reset();
+ pVMap.reset();
pWriteAcc.reset();
bRet = true;
}