diff --git a/src/Editor/WorldEditor/CCollisionRenderSettingsDialog.cpp b/src/Editor/WorldEditor/CCollisionRenderSettingsDialog.cpp index d31379de..0c812dfb 100644 --- a/src/Editor/WorldEditor/CCollisionRenderSettingsDialog.cpp +++ b/src/Editor/WorldEditor/CCollisionRenderSettingsDialog.cpp @@ -5,8 +5,8 @@ CCollisionRenderSettingsDialog::CCollisionRenderSettingsDialog(CWorldEditor *pEditor, QWidget *pParent /*= 0*/) : QDialog(pParent) + , mpUi(std::make_unique()) , mpEditor(pEditor) - , mpUi(new Ui::CCollisionRenderSettingsDialog) { mpUi->setupUi(this); @@ -27,10 +27,7 @@ CCollisionRenderSettingsDialog::CCollisionRenderSettingsDialog(CWorldEditor *pEd connect(mpUi->HideAiBlockCheckBox, SIGNAL(toggled(bool)), this, SLOT(OnHideCheckboxesToggled())); } -CCollisionRenderSettingsDialog::~CCollisionRenderSettingsDialog() -{ - delete mpUi; -} +CCollisionRenderSettingsDialog::~CCollisionRenderSettingsDialog() = default; void CCollisionRenderSettingsDialog::SetupWidgets() { diff --git a/src/Editor/WorldEditor/CCollisionRenderSettingsDialog.h b/src/Editor/WorldEditor/CCollisionRenderSettingsDialog.h index 6219dce2..e23cc366 100644 --- a/src/Editor/WorldEditor/CCollisionRenderSettingsDialog.h +++ b/src/Editor/WorldEditor/CCollisionRenderSettingsDialog.h @@ -2,6 +2,7 @@ #define CCOLLISIONRENDERSETTINGSDIALOG_H #include +#include class CWorldEditor; @@ -12,12 +13,12 @@ class CCollisionRenderSettingsDialog; class CCollisionRenderSettingsDialog : public QDialog { Q_OBJECT - Ui::CCollisionRenderSettingsDialog *mpUi; + std::unique_ptr mpUi; CWorldEditor *mpEditor; public: - explicit CCollisionRenderSettingsDialog(CWorldEditor *pEditor, QWidget *pParent = 0); + explicit CCollisionRenderSettingsDialog(CWorldEditor *pEditor, QWidget *pParent = nullptr); ~CCollisionRenderSettingsDialog(); public slots: