summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2018-04-24 14:51:04 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2018-04-29 17:04:39 +0200
commit22077670edcec437a3505ae412c06c974f273b7b (patch)
tree1531ca7cbcadc061068c1c2d42a9e2fd55e9175b /include
parente1c154eeabf37d603158ddc425d5afed125d3a15 (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 'include')
-rw-r--r--include/svtools/editbrowsebox.hxx5
1 files changed, 2 insertions, 3 deletions
diff --git a/include/svtools/editbrowsebox.hxx b/include/svtools/editbrowsebox.hxx
index 5d76e28e46f6..2c66a3cb612e 100644
--- a/include/svtools/editbrowsebox.hxx
+++ b/include/svtools/editbrowsebox.hxx
@@ -452,7 +452,7 @@ namespace svt
class BrowserMouseEventPtr
{
- BrowserMouseEvent* pEvent;
+ std::unique_ptr<BrowserMouseEvent> pEvent;
bool bDown;
public:
@@ -461,11 +461,10 @@ namespace svt
, bDown(false)
{
}
- ~BrowserMouseEventPtr(){Clear();}
bool Is() const {return pEvent != nullptr;}
bool IsDown() const {return bDown;}
- const BrowserMouseEvent* operator->() const {return pEvent;}
+ const BrowserMouseEvent* operator->() const {return pEvent.get();}
SVT_DLLPUBLIC void Clear();
void Set(const BrowserMouseEvent* pEvt, bool bIsDown);