From c92bfce739f2ff463365aaa47a50ebbb1bfef7e9 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Tue, 2 Aug 2011 19:42:05 +0300 Subject: A bit improve speed in guichan containers. --- src/guichan/basiccontainer.cpp | 3 ++- src/guichan/include/guichan/basiccontainer.hpp | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) (limited to 'src/guichan') diff --git a/src/guichan/basiccontainer.cpp b/src/guichan/basiccontainer.cpp index aa804f88b..d51968eb6 100644 --- a/src/guichan/basiccontainer.cpp +++ b/src/guichan/basiccontainer.cpp @@ -88,7 +88,8 @@ namespace gcn throw GCN_EXCEPTION("There is no such widget in this container."); mWidgets.erase(iter); - mWidgets.push_front(widget); + mWidgets.insert(mWidgets.begin(), widget); +// mWidgets.push_front(widget); } void BasicContainer::death(const Event& event) diff --git a/src/guichan/include/guichan/basiccontainer.hpp b/src/guichan/include/guichan/basiccontainer.hpp index 269a5ba44..b63b83cd8 100644 --- a/src/guichan/include/guichan/basiccontainer.hpp +++ b/src/guichan/include/guichan/basiccontainer.hpp @@ -45,6 +45,7 @@ #define GCN_BASICCONTAINER_HPP #include +#include #include "guichan/deathlistener.hpp" #include "guichan/platform.hpp" @@ -159,7 +160,7 @@ namespace gcn /** * Typedef. */ - typedef std::list WidgetList; + typedef std::vector WidgetList; /** * Typedef. -- cgit v1.2.3-70-g09d2