diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2018-02-06 15:24:01 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2018-02-19 07:13:11 +0100 |
commit | ef8ed797598062273ecb43fac8dbae4dbe3bf3cb (patch) | |
tree | cd29af037c18464146f23f26fb3d9b1fbcd9f966 /filter/source/graphicfilter/icgm/class1.cxx | |
parent | ccd316d1cb310734848bd20244f509024b549b8c (diff) |
loplugin:useuniqueptr in CGM
Change-Id: Iecd9251f68cd894a14fb6824151768d4cb663e0f
Reviewed-on: https://gerrit.libreoffice.org/49944
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'filter/source/graphicfilter/icgm/class1.cxx')
-rw-r--r-- | filter/source/graphicfilter/icgm/class1.cxx | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/filter/source/graphicfilter/icgm/class1.cxx b/filter/source/graphicfilter/icgm/class1.cxx index 3bd903796aab..b8eabf83f04d 100644 --- a/filter/source/graphicfilter/icgm/class1.cxx +++ b/filter/source/graphicfilter/icgm/class1.cxx @@ -164,9 +164,9 @@ void CGM::ImplDoClass1() { if ( mnElementSize > 1 ) { - sal_uInt8* pBuf = new sal_uInt8[ mnElementSize ]; - memcpy( pBuf, mpSource, mnElementSize ); - maDefRepList.push_back( pBuf ); + std::unique_ptr<sal_uInt8[]> pBuf(new sal_uInt8[ mnElementSize ]); + memcpy( pBuf.get(), mpSource, mnElementSize ); + maDefRepList.push_back( std::move(pBuf) ); maDefRepSizeList.push_back( mnElementSize ); } mnParaSize = mnElementSize; |