From dd0824c92a349b720919857637258489e347a7a5 Mon Sep 17 00:00:00 2001 From: James Raykowski Date: Sun, 16 Apr 2017 10:05:20 -0800 Subject: tdf#89329 Use std::unique_ptr for ImplData in vcl/syswin Change-Id: I5cf16991bba0cec80c7fbaf32f4529e4f022201b Reviewed-on: https://gerrit.libreoffice.org/36590 Tested-by: Jenkins Reviewed-by: Markus Mohrhard --- include/vcl/syswin.hxx | 3 ++- vcl/source/window/syswin.cxx | 3 +-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/include/vcl/syswin.hxx b/include/vcl/syswin.hxx index ac7a0d765c26..65e040172615 100644 --- a/include/vcl/syswin.hxx +++ b/include/vcl/syswin.hxx @@ -27,6 +27,7 @@ #include #include #include +#include class ModalDialog; class MenuBar; @@ -163,7 +164,7 @@ private: bool mbIsCalculatingInitialLayoutSize; MenuBarMode mnMenuBarMode; sal_uInt16 mnIcon; - ImplData* mpImplData; + std::unique_ptr mpImplData; Idle maLayoutIdle; OUString maNotebookBarUIFile; protected: diff --git a/vcl/source/window/syswin.cxx b/vcl/source/window/syswin.cxx index 6656f122ecd3..8d7460c4f9cf 100644 --- a/vcl/source/window/syswin.cxx +++ b/vcl/source/window/syswin.cxx @@ -101,8 +101,7 @@ SystemWindow::~SystemWindow() void SystemWindow::dispose() { maLayoutIdle.Stop(); - delete mpImplData; - mpImplData = nullptr; + mpImplData.reset(); // Hack to make sure code called from base ~Window does not interpret this // as a SystemWindow (which it no longer is by then): -- cgit v1.2.3