1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-12-01 23:12:49 +02:00

More missing virtual d-tors. GCC should be pleased.

Moved some code.
This commit is contained in:
Michał W. Urbańczyk
2010-01-02 01:48:44 +00:00
parent 58d1ec7ac5
commit 226935fd89
7 changed files with 513 additions and 503 deletions

View File

@@ -60,6 +60,7 @@ class CBaseForGSApply
{
public:
virtual void applyOnGS(CGameState *gs, void *pack) const =0;
virtual ~CBaseForGSApply(){};
};
template <typename T> class CApplyOnGS : public CBaseForGSApply
{
@@ -83,6 +84,13 @@ public:
{
registerTypes2(*this);
}
~CGSApplier()
{
std::map<ui16,CBaseForGSApply*>::iterator iter;
for(iter = apps.begin(); iter != apps.end(); iter++)
delete iter->second;
}
template<typename T> void registerType(const T * t=NULL)
{
ui16 ID = typeList.registerType(t);