summaryrefslogtreecommitdiff
path: root/vcl/source/control/scrbar.cxx
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2018-04-23 09:06:41 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2018-04-25 09:30:53 +0200
commit18c32d5824618e3ac00c4755f380b2b033a96fc9 (patch)
tree65d386ba7800e00d70af3ae41fddf37966b6146d /vcl/source/control/scrbar.cxx
parentef46d846fdedd9e94f7150afda810d12acce8c16 (diff)
loplugin:useuniqueptr in ScrollBar
Change-Id: I827e997391834d10a617b7c5be8ceafc19e97219 Reviewed-on: https://gerrit.libreoffice.org/53343 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'vcl/source/control/scrbar.cxx')
-rw-r--r--vcl/source/control/scrbar.cxx4
1 files changed, 2 insertions, 2 deletions
diff --git a/vcl/source/control/scrbar.cxx b/vcl/source/control/scrbar.cxx
index f34201af2a03..4efc0c807061 100644
--- a/vcl/source/control/scrbar.cxx
+++ b/vcl/source/control/scrbar.cxx
@@ -115,7 +115,7 @@ ScrollBar::~ScrollBar()
void ScrollBar::dispose()
{
- delete mpData; mpData = nullptr;
+ mpData.reset();
Control::dispose();
}
@@ -1137,7 +1137,7 @@ void ScrollBar::GetFocus()
{
if( !mpData )
{
- mpData = new ImplScrollBarData;
+ mpData.reset(new ImplScrollBarData);
mpData->maTimer.SetInvokeHandler( LINK( this, ScrollBar, ImplAutoTimerHdl ) );
mpData->maTimer.SetDebugName( "vcl::ScrollBar mpData->maTimer" );
mpData->mbHide = false;