include/vcl/dialog.hxx | 2 +- vcl/source/window/dialog.cxx | 5 ++--- 2 files changed, 3 insertions(+), 4 deletions(-)
New commits: commit 4fcbf856049e56f916d1044fa8cd7e3759a87079 Author: Xisco Fauli <aniste...@gmail.com> Date: Sat Jun 4 23:20:57 2016 +0200 tdf#89329: use unique_ptr for pImpl in dialog Change-Id: Ic08e35a08f3f72383be305e3458b83fe06e3e1a5 Reviewed-on: https://gerrit.libreoffice.org/25902 Tested-by: Jenkins <c...@libreoffice.org> Reviewed-by: Noel Grandin <noelgran...@gmail.com> diff --git a/include/vcl/dialog.hxx b/include/vcl/dialog.hxx index 3aa38f5..9c07747 100644 --- a/include/vcl/dialog.hxx +++ b/include/vcl/dialog.hxx @@ -37,7 +37,7 @@ public: private: VclPtr<Dialog> mpPrevExecuteDlg; - DialogImpl* mpDialogImpl; + std::unique_ptr<DialogImpl> mpDialogImpl; long mnMousePositioned; bool mbInExecute; bool mbInClose; diff --git a/vcl/source/window/dialog.cxx b/vcl/source/window/dialog.cxx index b3b39ae..30f051f 100644 --- a/vcl/source/window/dialog.cxx +++ b/vcl/source/window/dialog.cxx @@ -362,7 +362,7 @@ void Dialog::ImplInitDialogData() mpContentArea.clear(); mpActionArea.clear(); mnMousePositioned = 0; - mpDialogImpl = new DialogImpl; + mpDialogImpl.reset(new DialogImpl); } void Dialog::ImplInit( vcl::Window* pParent, WinBits nStyle, InitFlag eFlag ) @@ -583,8 +583,7 @@ Dialog::~Dialog() void Dialog::dispose() { - delete mpDialogImpl; - mpDialogImpl = nullptr; + mpDialogImpl.reset(); mpPrevExecuteDlg.clear(); mpActionArea.clear(); mpContentArea.clear(); _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits