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)
: QAbstractListModel(pParent)
, mpArea(nullptr)
{
}
CLayerModel::~CLayerModel()
{
}
CLayerModel::~CLayerModel() = default;
int CLayerModel::rowCount(const QModelIndex& /*parent*/) const
{

View File

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