CScaleNodeCommand: Make use of override where applicable

This commit is contained in:
Lioncash 2020-06-28 05:39:40 -04:00
parent fc2d48df87
commit 8c4e16d51e
2 changed files with 11 additions and 13 deletions

View File

@ -3,16 +3,13 @@
#include "Editor/INodeEditor.h"
CScaleNodeCommand::CScaleNodeCommand()
: IUndoCommand("Scale"),
mpEditor(nullptr),
mCommandEnded(false)
: IUndoCommand("Scale")
{
}
CScaleNodeCommand::CScaleNodeCommand(INodeEditor *pEditor, const QList<CSceneNode*>& rkNodes, bool UsePivot, const CVector3f& rkPivot, const CVector3f& rkDelta)
: IUndoCommand("Scale"),
mpEditor(pEditor),
mCommandEnded(false)
mpEditor(pEditor)
{
mNodeList.reserve(rkNodes.size());

View File

@ -18,18 +18,19 @@ class CScaleNodeCommand : public IUndoCommand
CVector3f NewScale;
};
QList<SNodeScale> mNodeList;
INodeEditor *mpEditor;
bool mCommandEnded;
INodeEditor *mpEditor = nullptr;
bool mCommandEnded = false;
public:
CScaleNodeCommand();
CScaleNodeCommand(INodeEditor *pEditor, const QList<CSceneNode*>& rkNodes, bool UsePivot, const CVector3f& rkPivot, const CVector3f& rkDelta);
~CScaleNodeCommand();
int id() const;
bool mergeWith(const QUndoCommand *pkOther);
void undo();
void redo();
bool AffectsCleanState() const { return true; }
~CScaleNodeCommand() override;
int id() const override;
bool mergeWith(const QUndoCommand *pkOther) override;
void undo() override;
void redo() override;
bool AffectsCleanState() const override { return true; }
static CScaleNodeCommand* End();
};