diff --git a/src/Editor/Undo/CCreateInstanceCommand.cpp b/src/Editor/Undo/CCreateInstanceCommand.cpp index bc4e1d88..557b0f14 100644 --- a/src/Editor/Undo/CCreateInstanceCommand.cpp +++ b/src/Editor/Undo/CCreateInstanceCommand.cpp @@ -12,7 +12,7 @@ CCreateInstanceCommand::CCreateInstanceCommand(CWorldEditor *pEditor, CScriptTem , mpNewInstance(nullptr) , mpNewNode(nullptr) { - ASSERT(mLayerIndex != -1); + ASSERT(mLayerIndex != UINT32_MAX); } void CCreateInstanceCommand::undo() diff --git a/src/Editor/Undo/CCreateInstanceCommand.h b/src/Editor/Undo/CCreateInstanceCommand.h index 50dd0728..49f7797b 100644 --- a/src/Editor/Undo/CCreateInstanceCommand.h +++ b/src/Editor/Undo/CCreateInstanceCommand.h @@ -24,9 +24,9 @@ class CCreateInstanceCommand : public IUndoCommand public: CCreateInstanceCommand(CWorldEditor *pEditor, CScriptTemplate *pTemplate, CScriptLayer *pLayer, const CVector3f& rkPosition); - void undo(); - void redo(); - bool AffectsCleanState() const { return true; } + void undo() override; + void redo() override; + bool AffectsCleanState() const override { return true; } }; #endif // CCREATEINSTANCECOMMAND_H