ICreateDeleteResourceCommand: Make use of override
This commit is contained in:
parent
a8305d48b0
commit
24a69164f7
|
@ -42,29 +42,29 @@ public:
|
||||||
gpEdApp->ResourceBrowser()->ResourceDeleted();
|
gpEdApp->ResourceBrowser()->ResourceDeleted();
|
||||||
}
|
}
|
||||||
|
|
||||||
bool AffectsCleanState() const { return false; }
|
bool AffectsCleanState() const override { return false; }
|
||||||
};
|
};
|
||||||
|
|
||||||
class CCreateResourceCommand : public ICreateDeleteResourceCommand
|
class CCreateResourceCommand : public ICreateDeleteResourceCommand
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
CCreateResourceCommand(CResourceEntry* pEntry)
|
explicit CCreateResourceCommand(CResourceEntry* pEntry)
|
||||||
: ICreateDeleteResourceCommand("Create Resource", pEntry)
|
: ICreateDeleteResourceCommand("Create Resource", pEntry)
|
||||||
{}
|
{}
|
||||||
|
|
||||||
void undo() { DoDelete(); }
|
void undo() override { DoDelete(); }
|
||||||
void redo() { DoCreate(); }
|
void redo() override { DoCreate(); }
|
||||||
};
|
};
|
||||||
|
|
||||||
class CDeleteResourceCommand : public ICreateDeleteResourceCommand
|
class CDeleteResourceCommand : public ICreateDeleteResourceCommand
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
CDeleteResourceCommand(CResourceEntry* pEntry)
|
explicit CDeleteResourceCommand(CResourceEntry* pEntry)
|
||||||
: ICreateDeleteResourceCommand("Delete Resource", pEntry)
|
: ICreateDeleteResourceCommand("Delete Resource", pEntry)
|
||||||
{}
|
{}
|
||||||
|
|
||||||
void undo() { DoCreate(); }
|
void undo() override { DoCreate(); }
|
||||||
void redo() { DoDelete(); }
|
void redo() override { DoDelete(); }
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif // ICREATEDELETERESOURCECOMMAND_H
|
#endif // ICREATEDELETERESOURCECOMMAND_H
|
||||||
|
|
Loading…
Reference in New Issue