diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2018-09-04 12:20:38 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2018-09-05 09:30:14 +0200 |
commit | de688dd0efdc39f6f7b3d98631d5bd08d060b8cc (patch) | |
tree | e6646982d733daa1dcaa1d1e22498c4e42d90f43 /vcl/workben | |
parent | f338432f2eced2605ae555c646a22e3b5e4162b1 (diff) |
loplugin:useuniqueptr in NWPaintGTKScrollbar
Change-Id: I3d0f124c1513ddeca1cefbc68e08883af95e343d
Reviewed-on: https://gerrit.libreoffice.org/60000
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'vcl/workben')
-rw-r--r-- | vcl/workben/vcldemo.cxx | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/vcl/workben/vcldemo.cxx b/vcl/workben/vcldemo.cxx index ba27b77bdaab..f36009e200c9 100644 --- a/vcl/workben/vcldemo.cxx +++ b/vcl/workben/vcldemo.cxx @@ -636,8 +636,8 @@ public: } // DX array rendering - long *pItems = new long[aText.getLength()+10]; - rDev.GetTextArray(aText, pItems); + std::unique_ptr<long[]> pItems(new long[aText.getLength()+10]); + rDev.GetTextArray(aText, pItems.get()); for (long j = 0; j < aText.getLength(); ++j) { Point aTop = aTextRect.TopLeft(); @@ -649,7 +649,6 @@ public: rDev.DrawLine(aTop,aBottom); rDev.SetRasterOp(RasterOp::OverPaint); } - delete[] pItems; aPos.Move(aTextRect.GetWidth() + 16, 0); } |