diff --git a/src/Editor/Undo/CTranslateNodeCommand.cpp b/src/Editor/Undo/CTranslateNodeCommand.cpp index 53698925..0c9292bf 100644 --- a/src/Editor/Undo/CTranslateNodeCommand.cpp +++ b/src/Editor/Undo/CTranslateNodeCommand.cpp @@ -3,16 +3,13 @@ #include "Editor/INodeEditor.h" CTranslateNodeCommand::CTranslateNodeCommand() - : IUndoCommand("Translate"), - mpEditor(nullptr), - mCommandEnded(false) + : IUndoCommand("Translate") { } CTranslateNodeCommand::CTranslateNodeCommand(INodeEditor *pEditor, const QList& rkNodes, const CVector3f& Delta, ETransformSpace TransformSpace) : IUndoCommand("Translate"), - mpEditor(pEditor), - mCommandEnded(false) + mpEditor(pEditor) { mNodeList.reserve(rkNodes.size()); diff --git a/src/Editor/Undo/CTranslateNodeCommand.h b/src/Editor/Undo/CTranslateNodeCommand.h index 21f5e9c5..09c46a4c 100644 --- a/src/Editor/Undo/CTranslateNodeCommand.h +++ b/src/Editor/Undo/CTranslateNodeCommand.h @@ -16,17 +16,18 @@ class CTranslateNodeCommand : public IUndoCommand CVector3f NewPos; }; QList mNodeList; - INodeEditor *mpEditor; - bool mCommandEnded; + INodeEditor *mpEditor = nullptr; + bool mCommandEnded = false; public: CTranslateNodeCommand(); CTranslateNodeCommand(INodeEditor *pEditor, const QList& rkNodes, const CVector3f& rkDelta, ETransformSpace TransformSpace); - int id() const; - bool mergeWith(const QUndoCommand *pkOther); - void undo(); - void redo(); - bool AffectsCleanState() const { return true; } + + int id() const override; + bool mergeWith(const QUndoCommand *pkOther) override; + void undo() override; + void redo() override; + bool AffectsCleanState() const override { return true; } static CTranslateNodeCommand* End(); };