diff options
Diffstat (limited to 'src/being.cpp')
-rw-r--r-- | src/being.cpp | 14 |
1 files changed, 3 insertions, 11 deletions
diff --git a/src/being.cpp b/src/being.cpp index 579ad54f..2bb0beff 100644 --- a/src/being.cpp +++ b/src/being.cpp @@ -91,18 +91,10 @@ Being* createBeing(unsigned int id, unsigned short job, Map *map) return being; } -void remove_node(unsigned int id) +void remove_node(Being *being) { - std::list<Being *>::iterator i; - for (i = beings.begin(); i != beings.end(); i++) - { - if ((*i)->getId() == id) - { - delete (*i); - beings.erase(i); - return; - } - } + delete being; + beings.remove(being); } Being *findNode(unsigned int id) |