Kaydet (Commit) c2f5a026 authored tarafından Noel Grandin's avatar Noel Grandin

loplugin:useuniqueptr in TabControl

Change-Id: I4d6ce243c92de740fbb5b6934aaf14dbe28eb18e
Reviewed-on: https://gerrit.libreoffice.org/53351Tested-by: 's avatarJenkins <ci@libreoffice.org>
Reviewed-by: 's avatarNoel Grandin <noel.grandin@collabora.co.uk>
üst ffe251f6
......@@ -50,7 +50,7 @@ class ListBox;
class VCL_DLLPUBLIC TabControl : public Control
{
protected:
ImplTabCtrlData* mpTabCtrlData;
std::unique_ptr<ImplTabCtrlData> mpTabCtrlData;
long mnLastWidth;
long mnLastHeight;
long mnMaxPageWidth;
......
......@@ -98,7 +98,7 @@ void TabControl::ImplInit( vcl::Window* pParent, WinBits nStyle )
mbFormat = true;
mbRestoreHelpId = false;
mbSmallInvalidate = false;
mpTabCtrlData = new ImplTabCtrlData;
mpTabCtrlData.reset(new ImplTabCtrlData);
mpTabCtrlData->mpListBox = nullptr;
ImplInitSettings( true );
......@@ -198,8 +198,7 @@ void TabControl::dispose()
// delete TabCtrl data
if (mpTabCtrlData)
mpTabCtrlData->mpListBox.disposeAndClear();
delete mpTabCtrlData;
mpTabCtrlData = nullptr;
mpTabCtrlData.reset();
Control::dispose();
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment