summaryrefslogtreecommitdiff
path: root/src/guichan/gui.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2012-06-01 21:54:19 +0300
committerAndrei Karas <akaras@inbox.ru>2012-06-01 21:54:19 +0300
commit29ce8ef5e2533a053fcd93ec44fc07e1990ad618 (patch)
tree13fe762ec04ab2c6ba0372c764a5a49b8d1dc73d /src/guichan/gui.cpp
parentf6261c7070142f32ea45f24151270dd7993d73ff (diff)
downloadmanaplus-29ce8ef5e2533a053fcd93ec44fc07e1990ad618.tar.gz
manaplus-29ce8ef5e2533a053fcd93ec44fc07e1990ad618.tar.bz2
manaplus-29ce8ef5e2533a053fcd93ec44fc07e1990ad618.tar.xz
manaplus-29ce8ef5e2533a053fcd93ec44fc07e1990ad618.zip
Small optimisation with iterators in guichan code.
Diffstat (limited to 'src/guichan/gui.cpp')
-rw-r--r--src/guichan/gui.cpp14
1 files changed, 8 insertions, 6 deletions
diff --git a/src/guichan/gui.cpp b/src/guichan/gui.cpp
index c96c61737..9e0229f05 100644
--- a/src/guichan/gui.cpp
+++ b/src/guichan/gui.cpp
@@ -344,9 +344,10 @@ namespace gcn
// Check if the widget is present in the "widget with mouse" queue.
bool widgetIsPresentInQueue = false;
- std::deque<Widget*>::const_iterator iter;
- for (iter = mWidgetWithMouseQueue.begin();
- iter != mWidgetWithMouseQueue.end();
+ for (std::deque<Widget*>::const_iterator
+ iter = mWidgetWithMouseQueue.begin(),
+ iter_end = mWidgetWithMouseQueue.end();
+ iter != iter_end;
++ iter)
{
if (*iter == widget)
@@ -857,9 +858,10 @@ namespace gcn
// Check if the widget is present in the "widget with mouse" queue.
bool widgetIsPresentInQueue = false;
- std::deque<Widget*>::const_iterator iter;
- for (iter = mWidgetWithMouseQueue.begin();
- iter != mWidgetWithMouseQueue.end();
+ for (std::deque<Widget*>::const_iterator
+ iter = mWidgetWithMouseQueue.begin(),
+ iter_end = mWidgetWithMouseQueue.end();
+ iter != iter_end;
++ iter)
{
if (*iter == widget)