diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2018-04-24 14:51:04 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2018-04-29 17:04:39 +0200 |
commit | 22077670edcec437a3505ae412c06c974f273b7b (patch) | |
tree | 1531ca7cbcadc061068c1c2d42a9e2fd55e9175b /svtools/source | |
parent | e1c154eeabf37d603158ddc425d5afed125d3a15 (diff) |
loplugin:useuniqueptr in BrowserMouseEventPtr
Change-Id: Idbde5b63fc1241bef0a9237727fa1b010ce1eef9
Reviewed-on: https://gerrit.libreoffice.org/53599
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'svtools/source')
-rw-r--r-- | svtools/source/brwbox/editbrowsebox.cxx | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/svtools/source/brwbox/editbrowsebox.cxx b/svtools/source/brwbox/editbrowsebox.cxx index 41d824fddbbe..1a9cb86b80aa 100644 --- a/svtools/source/brwbox/editbrowsebox.cxx +++ b/svtools/source/brwbox/editbrowsebox.cxx @@ -82,25 +82,25 @@ namespace svt void EditBrowseBox::BrowserMouseEventPtr::Clear() { - DELETEZ(pEvent); + pEvent.reset(); } void EditBrowseBox::BrowserMouseEventPtr::Set(const BrowserMouseEvent* pEvt, bool bIsDown) { - if (pEvt == pEvent) + if (pEvt == pEvent.get()) { bDown = bIsDown; return; } - Clear(); + pEvent.reset(); if (pEvt) { - pEvent = new BrowserMouseEvent(pEvt->GetWindow(), + pEvent.reset(new BrowserMouseEvent(pEvt->GetWindow(), *pEvt, pEvt->GetRow(), pEvt->GetColumn(), pEvt->GetColumnId(), - pEvt->GetRect()); + pEvt->GetRect())); bDown = bIsDown; } } |