WEditorProperties: Make use of in-class initializers where applicable

This commit is contained in:
Lioncash 2020-06-28 06:56:08 -04:00
parent 012faba4cc
commit d5f7699f34
2 changed files with 6 additions and 8 deletions

View File

@ -2,11 +2,8 @@
#include "Editor/Undo/CEditScriptPropertyCommand.h"
#include <Core/Resource/Script/CScriptLayer.h>
WEditorProperties::WEditorProperties(QWidget *pParent /*= 0*/)
WEditorProperties::WEditorProperties(QWidget *pParent)
: QWidget(pParent)
, mpEditor(nullptr)
, mpDisplayNode(nullptr)
, mHasEditedName(false)
{
mpInstanceInfoLabel = new QLabel;
mpInstanceInfoLabel->setText("<i>[No selection]</i>");

View File

@ -14,8 +14,8 @@
class WEditorProperties : public QWidget
{
Q_OBJECT
CWorldEditor* mpEditor;
CSceneNode* mpDisplayNode;
CWorldEditor* mpEditor = nullptr;
CSceneNode* mpDisplayNode = nullptr;
QVBoxLayout* mpMainLayout;
@ -30,10 +30,11 @@ class WEditorProperties : public QWidget
QComboBox* mpLayersComboBox;
QHBoxLayout* mpLayersLayout;
bool mHasEditedName;
bool mHasEditedName = false;
public:
WEditorProperties(QWidget* pParent = 0);
explicit WEditorProperties(QWidget* pParent = nullptr);
void SyncToEditor(CWorldEditor* pEditor);
void SetLayerComboBox();