diff options
author | James Raykowski <raykowj@gmail.com> | 2017-04-16 10:05:20 -0800 |
---|---|---|
committer | Markus Mohrhard <markus.mohrhard@googlemail.com> | 2017-04-17 01:34:57 +0200 |
commit | dd0824c92a349b720919857637258489e347a7a5 (patch) | |
tree | 10edb5ad3597595628b426f9d6d1e188a4e717b2 | |
parent | 0497facb723d90fae6cade86d9075ddfc18f83b9 (diff) |
tdf#89329 Use std::unique_ptr for ImplData in vcl/syswin
Change-Id: I5cf16991bba0cec80c7fbaf32f4529e4f022201b
Reviewed-on: https://gerrit.libreoffice.org/36590
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Markus Mohrhard <markus.mohrhard@googlemail.com>
-rw-r--r-- | include/vcl/syswin.hxx | 3 | ||||
-rw-r--r-- | 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 <vcl/notebookbar.hxx> #include <vcl/window.hxx> #include <o3tl/typed_flags_set.hxx> +#include <memory> class ModalDialog; class MenuBar; @@ -163,7 +164,7 @@ private: bool mbIsCalculatingInitialLayoutSize; MenuBarMode mnMenuBarMode; sal_uInt16 mnIcon; - ImplData* mpImplData; + std::unique_ptr<ImplData> 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): |