summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorPaweł Redman <pawel.redman@gmail.com>2017-12-16 19:23:01 +0100
committerPaweł Redman <pawel.redman@gmail.com>2017-12-16 19:23:01 +0100
commitda4e3c6509fa6e00f5bbcb3a34607dd966650d1a (patch)
tree94b4cdd06ee3142802fc1f3fb34cb9f6087807dc /src
parent820e2e9d428c273e065cfe18b48c183a5cbedd75 (diff)
Clean up the virtual dtor mess.
Diffstat (limited to 'src')
-rw-r--r--src/common.hpp2
-rw-r--r--src/game/game.cpp4
-rw-r--r--src/game/game.hpp2
-rw-r--r--src/world.cpp4
4 files changed, 10 insertions, 2 deletions
diff --git a/src/common.hpp b/src/common.hpp
index eaed590..5a9dccc 100644
--- a/src/common.hpp
+++ b/src/common.hpp
@@ -145,7 +145,7 @@ namespace world {
int render_layer = 0;
entity_t(int type_);
- ~entity_t(void) {};
+ virtual ~entity_t(void) = 0;
void link(world_t *world);
void unlink();
diff --git a/src/game/game.cpp b/src/game/game.cpp
index 35cb90c..35d66ec 100644
--- a/src/game/game.cpp
+++ b/src/game/game.cpp
@@ -9,6 +9,10 @@ entity_t::entity_t(game::state_t *game_, int type_) : world::entity_t(type_)
game = game_;
}
+entity_t::~entity_t(void)
+{
+}
+
void entity_t::destroy(void)
{
unlink();
diff --git a/src/game/game.hpp b/src/game/game.hpp
index b9a426b..04380be 100644
--- a/src/game/game.hpp
+++ b/src/game/game.hpp
@@ -62,7 +62,7 @@ namespace game {
rectf_t size, render_size;
entity_t(game::state_t *game, int type_);
- ~entity_t(void) {};
+ virtual ~entity_t(void) = 0;
void destroy(void);
void place(world::world_t *world);
diff --git a/src/world.cpp b/src/world.cpp
index a5e8869..a41b793 100644
--- a/src/world.cpp
+++ b/src/world.cpp
@@ -369,6 +369,10 @@ entity_t::entity_t(int type_)
type = type_;
}
+entity_t::~entity_t(void)
+{
+}
+
void entity_t::link_to_sector(sector_t *sector)
{
parents.push_back(sector);