CCollisionRenderSettingsDialog: Make use of in-class initializers where applicable

This commit is contained in:
Lioncash 2020-06-28 02:54:21 -04:00
parent 4c6080184f
commit 68a8f236fa
2 changed files with 5 additions and 7 deletions

View File

@ -5,8 +5,8 @@
CCollisionRenderSettingsDialog::CCollisionRenderSettingsDialog(CWorldEditor *pEditor, QWidget *pParent /*= 0*/)
: QDialog(pParent)
, mpUi(std::make_unique<Ui::CCollisionRenderSettingsDialog>())
, 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()
{

View File

@ -2,6 +2,7 @@
#define CCOLLISIONRENDERSETTINGSDIALOG_H
#include <QDialog>
#include <memory>
class CWorldEditor;
@ -12,12 +13,12 @@ class CCollisionRenderSettingsDialog;
class CCollisionRenderSettingsDialog : public QDialog
{
Q_OBJECT
Ui::CCollisionRenderSettingsDialog *mpUi;
std::unique_ptr<Ui::CCollisionRenderSettingsDialog> mpUi;
CWorldEditor *mpEditor;
public:
explicit CCollisionRenderSettingsDialog(CWorldEditor *pEditor, QWidget *pParent = 0);
explicit CCollisionRenderSettingsDialog(CWorldEditor *pEditor, QWidget *pParent = nullptr);
~CCollisionRenderSettingsDialog();
public slots: