summaryrefslogtreecommitdiff
path: root/src/guichan/focushandler.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2012-06-23 02:46:01 +0300
committerAndrei Karas <akaras@inbox.ru>2012-06-23 02:48:43 +0300
commita69a87c5a81ddbf25a25c5549259da550d207bda (patch)
tree59f1a919b327912395ab84bab1684118bf0379be /src/guichan/focushandler.cpp
parente646f2fae3f323b7faa26aa9540524d1765211ee (diff)
downloadplus-a69a87c5a81ddbf25a25c5549259da550d207bda.tar.gz
plus-a69a87c5a81ddbf25a25c5549259da550d207bda.tar.bz2
plus-a69a87c5a81ddbf25a25c5549259da550d207bda.tar.xz
plus-a69a87c5a81ddbf25a25c5549259da550d207bda.zip
Improve a bit iterators again.
Diffstat (limited to 'src/guichan/focushandler.cpp')
-rw-r--r--src/guichan/focushandler.cpp8
1 files changed, 3 insertions, 5 deletions
diff --git a/src/guichan/focushandler.cpp b/src/guichan/focushandler.cpp
index e3610fb1e..839c35cc1 100644
--- a/src/guichan/focushandler.cpp
+++ b/src/guichan/focushandler.cpp
@@ -73,9 +73,8 @@ namespace gcn
if (!widget || widget == mFocusedWidget)
return;
- unsigned int i = 0;
int toBeFocusedIndex = -1;
- for (i = 0; i < mWidgets.size(); ++i)
+ for (unsigned int i = 0; i < mWidgets.size(); ++i)
{
if (mWidgets[i] == widget)
{
@@ -272,9 +271,8 @@ namespace gcn
if (isFocused(widget))
mFocusedWidget = nullptr;
- WidgetIterator iter;
-
- for (iter = mWidgets.begin(); iter != mWidgets.end(); ++iter)
+ for (WidgetIterator iter = mWidgets.begin();
+ iter != mWidgets.end(); ++iter)
{
if ((*iter) == widget)
{