include/vcl/syswin.hxx | 3 ++- vcl/source/window/syswin.cxx | 3 +-- 2 files changed, 3 insertions(+), 3 deletions(-)
New commits: commit dd0824c92a349b720919857637258489e347a7a5 Author: James Raykowski <rayk...@gmail.com> Date: Sun Apr 16 10:05:20 2017 -0800 tdf#89329 Use std::unique_ptr for ImplData in vcl/syswin Change-Id: I5cf16991bba0cec80c7fbaf32f4529e4f022201b Reviewed-on: https://gerrit.libreoffice.org/36590 Tested-by: Jenkins <c...@libreoffice.org> Reviewed-by: Markus Mohrhard <markus.mohrh...@googlemail.com> 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): _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits