summaryrefslogtreecommitdiff
path: root/vcl/source/edit
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2018-04-13 09:52:58 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2018-04-16 08:22:55 +0200
commit1e9101e7bd2d423416fcf1cb1c1b15a140aa12e6 (patch)
treea31c8eada0c1461a6e0a759aaf1fe59c979302e5 /vcl/source/edit
parentbe408facea08a28c83b2de6c0587235a6949e704 (diff)
loplugin:useuniqueptr in VclMultiLineEdit
Change-Id: I386aa427e12cc97bd116102b1cc75fd7c0d56d61 Reviewed-on: https://gerrit.libreoffice.org/52889 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'vcl/source/edit')
-rw-r--r--vcl/source/edit/vclmedit.cxx13
1 files changed, 4 insertions, 9 deletions
diff --git a/vcl/source/edit/vclmedit.cxx b/vcl/source/edit/vclmedit.cxx
index 092970d08f28..32a2b209696e 100644
--- a/vcl/source/edit/vclmedit.cxx
+++ b/vcl/source/edit/vclmedit.cxx
@@ -904,7 +904,7 @@ VclMultiLineEdit::VclMultiLineEdit( vcl::Window* pParent, WinBits nWinStyle )
: Edit( pParent, nWinStyle )
{
SetType( WindowType::MULTILINEEDIT );
- pImpVclMEdit = new ImpVclMEdit( this, nWinStyle );
+ pImpVclMEdit.reset(new ImpVclMEdit( this, nWinStyle ));
ImplInitSettings( true );
pUpdateDataTimer = nullptr;
@@ -919,13 +919,8 @@ VclMultiLineEdit::~VclMultiLineEdit()
void VclMultiLineEdit::dispose()
{
- {
- std::unique_ptr< ImpVclMEdit > xDelete(pImpVclMEdit);
- pImpVclMEdit = nullptr;
- }
- delete pUpdateDataTimer;
- pUpdateDataTimer = nullptr;
-
+ pImpVclMEdit.reset();
+ pUpdateDataTimer.reset();
Edit::dispose();
}
@@ -1094,7 +1089,7 @@ void VclMultiLineEdit::EnableUpdateData( sal_uLong nTimeout )
{
if ( !pUpdateDataTimer )
{
- pUpdateDataTimer = new Timer("MultiLineEditTimer");
+ pUpdateDataTimer.reset(new Timer("MultiLineEditTimer"));
pUpdateDataTimer->SetInvokeHandler( LINK( this, VclMultiLineEdit, ImpUpdateDataHdl ) );
}
pUpdateDataTimer->SetTimeout( nTimeout );