X-Git-Url: https://git.verplant.org/?a=blobdiff_plain;f=src%2Fgame_object.cpp;h=ee63ec1c1547acc9820a54b1278111ee8da11eae;hb=4a486d92343d1824b311c234e9321e08f280fe68;hp=08c0eb1480f020f297ce55d45271e29c62d897f6;hpb=8a627e73d824b5a14249cfe066dc2fdc643ce28d;p=supertux.git diff --git a/src/game_object.cpp b/src/game_object.cpp index 08c0eb148..ee63ec1c1 100644 --- a/src/game_object.cpp +++ b/src/game_object.cpp @@ -22,26 +22,20 @@ #include "game_object.hpp" #include "object_remove_listener.hpp" - -GameObject::GameObject(std::string name) - : wants_to_die(false), remove_listeners(0), name(name) +GameObject::GameObject() + : wants_to_die(false), remove_listeners(NULL) { } -GameObject::GameObject(const lisp::Lisp& lisp) - : wants_to_die(false), remove_listeners(0), name("") -{ - lisp.get("name" , name); -} - GameObject::~GameObject() { // call remove listeners (and remove them from the list) RemoveListenerListEntry* entry = remove_listeners; - while(entry != 0) { + while(entry != NULL) { RemoveListenerListEntry* next = entry->next; entry->listener->object_removed(this); delete entry; entry = next; } } +