CPoiMapModel: Make use of in-class initializers where applicable

This commit is contained in:
Lioncash 2020-06-28 04:29:46 -04:00
parent 51ba13f988
commit a9292c1b29
2 changed files with 7 additions and 8 deletions

View File

@ -4,11 +4,9 @@
#include <Core/Scene/CSceneIterator.h>
#include <Core/ScriptExtra/CPointOfInterestExtra.h>
CPoiMapModel::CPoiMapModel(CWorldEditor *pEditor, QObject *pParent /*= 0*/)
CPoiMapModel::CPoiMapModel(CWorldEditor *pEditor, QObject *pParent)
: QAbstractListModel(pParent)
, mpEditor(pEditor)
, mpArea(nullptr)
, mpPoiToWorld(nullptr)
{
connect(pEditor, SIGNAL(MapChanged(CWorld*,CGameArea*)), this, SLOT(OnMapChange(CWorld*,CGameArea*)));
}

View File

@ -16,16 +16,17 @@ class CPoiMapModel : public QAbstractListModel
Q_OBJECT
CWorldEditor *mpEditor;
CGameArea *mpArea;
CGameArea *mpArea = nullptr;
TResPtr<CPoiToWorld> mpPoiToWorld;
QMap<CScriptNode*, QList<CModelNode*>*> mModelMap;
public:
explicit CPoiMapModel(CWorldEditor *pEditor, QObject *pParent = 0);
QVariant headerData(int Section, Qt::Orientation Orientation, int Role) const;
int rowCount(const QModelIndex& rkParent) const;
QVariant data(const QModelIndex& rkIndex, int Role) const;
explicit CPoiMapModel(CWorldEditor *pEditor, QObject *pParent = nullptr);
QVariant headerData(int Section, Qt::Orientation Orientation, int Role) const override;
int rowCount(const QModelIndex& rkParent) const override;
QVariant data(const QModelIndex& rkIndex, int Role) const override;
void AddPOI(CScriptNode *pPOI);
void AddMapping(const QModelIndex& rkIndex, CModelNode *pNode);