diff options
-rw-r--r-- | ChangeLog | 3 | ||||
-rw-r--r-- | src/gui/gccontainer.cpp | 14 | ||||
-rw-r--r-- | src/gui/gccontainer.h | 8 |
3 files changed, 13 insertions, 12 deletions
@@ -7,6 +7,9 @@ * src/gui/window.h, src/gui/window.cpp: Fixed warnings about hiding virtual method, Window now always deletes its children (the option not to do so was never used anyway). + * src/gui/gccontainer.h, src/gui/gccontainer.cpp: Removed unused + option from GCContainer to not delete a child, fixing warnings about + hiding virtual method gcn::Container::add. 2008-04-28 Bjørn Lindeijer <bjorn@lindeijer.nl> diff --git a/src/gui/gccontainer.cpp b/src/gui/gccontainer.cpp index c22ddfc9..1edb4daf 100644 --- a/src/gui/gccontainer.cpp +++ b/src/gui/gccontainer.cpp @@ -37,21 +37,15 @@ GCContainer::~GCContainer() mDeathList.clear(); } -void GCContainer::add(gcn::Widget *w, bool delChild) +void GCContainer::add(gcn::Widget *w) { - if (delChild) { - mDeathList.push_back(w); - } - + mDeathList.push_back(w); Container::add(w); } -void GCContainer::add(gcn::Widget *w, int x, int y, bool delChild) +void GCContainer::add(gcn::Widget *w, int x, int y) { - if (delChild) { - mDeathList.push_back(w); - } - + mDeathList.push_back(w); Container::add(w, x, y); } diff --git a/src/gui/gccontainer.h b/src/gui/gccontainer.h index e27eaa96..8b8a7ffe 100644 --- a/src/gui/gccontainer.h +++ b/src/gui/gccontainer.h @@ -28,14 +28,18 @@ #include <guichan/widgets/container.hpp> +/** + * A garbage collecting container. Childs added to this container are + * automatically deleted when the container is deleted. + */ class GCContainer : public gcn::Container { public: virtual ~GCContainer(); - virtual void add(gcn::Widget *w, bool delChild = true); + virtual void add(gcn::Widget *w); - virtual void add(gcn::Widget *w, int x, int y, bool delChild = true); + virtual void add(gcn::Widget *w, int x, int y); virtual void death(const gcn::Event &event); |