CLayerModel: Make use of in-class initializers where applicable

This commit is contained in:
Lioncash 2020-06-28 03:58:13 -04:00
parent d537cfd4b2
commit 968fc70cbf
2 changed files with 6 additions and 8 deletions

View File

@ -4,13 +4,10 @@
CLayerModel::CLayerModel(QObject *pParent) CLayerModel::CLayerModel(QObject *pParent)
: QAbstractListModel(pParent) : QAbstractListModel(pParent)
, mpArea(nullptr)
{ {
} }
CLayerModel::~CLayerModel() CLayerModel::~CLayerModel() = default;
{
}
int CLayerModel::rowCount(const QModelIndex& /*parent*/) const int CLayerModel::rowCount(const QModelIndex& /*parent*/) const
{ {

View File

@ -9,10 +9,11 @@ class CLayerModel : public QAbstractListModel
TResPtr<CGameArea> mpArea; TResPtr<CGameArea> mpArea;
public: public:
explicit CLayerModel(QObject *pParent = 0); explicit CLayerModel(QObject *pParent = nullptr);
~CLayerModel(); ~CLayerModel() override;
int rowCount(const QModelIndex &parent) const;
QVariant data(const QModelIndex &index, int role) const; int rowCount(const QModelIndex &parent) const override;
QVariant data(const QModelIndex &index, int role) const override;
void SetArea(CGameArea *pArea); void SetArea(CGameArea *pArea);
CScriptLayer* Layer(const QModelIndex& index) const; CScriptLayer* Layer(const QModelIndex& index) const;
}; };