CRotateNodeCommand: Make use of override where applicable

This commit is contained in:
Lioncash 2020-06-28 05:37:47 -04:00
parent c118703ce5
commit fc2d48df87
2 changed files with 11 additions and 13 deletions

View File

@ -3,9 +3,7 @@
#include "Editor/INodeEditor.h"
CRotateNodeCommand::CRotateNodeCommand()
: IUndoCommand("Rotate"),
mpEditor(nullptr),
mCommandEnded(false)
: IUndoCommand("Rotate")
{
}
@ -19,8 +17,7 @@ CRotateNodeCommand::CRotateNodeCommand(
ETransformSpace TransformSpace
)
: IUndoCommand("Rotate"),
mpEditor(pEditor),
mCommandEnded(false)
mpEditor(pEditor)
{
mNodeList.reserve(rkNodes.size());

View File

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