diff --git a/src/Editor/CharacterEditor/CSkeletonHierarchyModel.cpp b/src/Editor/CharacterEditor/CSkeletonHierarchyModel.cpp index 86c2634a..21b79c51 100644 --- a/src/Editor/CharacterEditor/CSkeletonHierarchyModel.cpp +++ b/src/Editor/CharacterEditor/CSkeletonHierarchyModel.cpp @@ -1,9 +1,8 @@ #include "CSkeletonHierarchyModel.h" #include "Editor/UICommon.h" -CSkeletonHierarchyModel::CSkeletonHierarchyModel(QObject *pParent /*= 0*/) +CSkeletonHierarchyModel::CSkeletonHierarchyModel(QObject *pParent) : QAbstractItemModel(pParent) - , mpSkeleton(nullptr) { } diff --git a/src/Editor/CharacterEditor/CSkeletonHierarchyModel.h b/src/Editor/CharacterEditor/CSkeletonHierarchyModel.h index 52223ea8..44bee149 100644 --- a/src/Editor/CharacterEditor/CSkeletonHierarchyModel.h +++ b/src/Editor/CharacterEditor/CSkeletonHierarchyModel.h @@ -6,15 +6,16 @@ class CSkeletonHierarchyModel : public QAbstractItemModel { - CSkeleton *mpSkeleton; + CSkeleton *mpSkeleton = nullptr; public: - explicit CSkeletonHierarchyModel(QObject *pParent = 0); - QModelIndex index(int Row, int Column, const QModelIndex& rkParent) const; - QModelIndex parent(const QModelIndex& rkChild) const; - int rowCount(const QModelIndex& rkParent) const; - int columnCount(const QModelIndex& rkParent) const; - QVariant data(const QModelIndex& rkIndex, int Role) const; + explicit CSkeletonHierarchyModel(QObject *pParent = nullptr); + + QModelIndex index(int Row, int Column, const QModelIndex& rkParent) const override; + QModelIndex parent(const QModelIndex& rkChild) const override; + int rowCount(const QModelIndex& rkParent) const override; + int columnCount(const QModelIndex& rkParent) const override; + QVariant data(const QModelIndex& rkIndex, int Role) const override; CBone* BoneForIndex(const QModelIndex& rkIndex) const; QModelIndex IndexForBone(CBone *pBone) const;