summaryrefslogtreecommitdiff
path: root/src/being.cpp
diff options
context:
space:
mode:
authorBjörn Steinbrink <B.Steinbrink@gmx.de>2005-09-13 21:41:51 +0000
committerBjörn Steinbrink <B.Steinbrink@gmx.de>2005-09-13 21:41:51 +0000
commit78771718bf7af14273d7bb0090dccff97b00b397 (patch)
tree303aef757ae998e3d5a8afb6b5b502381e7252ec /src/being.cpp
parenta68d11c8f32ac8795a27fe3bc27e1943ee6dc813 (diff)
downloadmana-client-78771718bf7af14273d7bb0090dccff97b00b397.tar.gz
mana-client-78771718bf7af14273d7bb0090dccff97b00b397.tar.bz2
mana-client-78771718bf7af14273d7bb0090dccff97b00b397.tar.xz
mana-client-78771718bf7af14273d7bb0090dccff97b00b397.zip
Simplify remove_node.
Diffstat (limited to 'src/being.cpp')
-rw-r--r--src/being.cpp14
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)