summaryrefslogtreecommitdiff
path: root/src/guichan/widget.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/widget.cpp
parente646f2fae3f323b7faa26aa9540524d1765211ee (diff)
downloadmanaverse-a69a87c5a81ddbf25a25c5549259da550d207bda.tar.gz
manaverse-a69a87c5a81ddbf25a25c5549259da550d207bda.tar.bz2
manaverse-a69a87c5a81ddbf25a25c5549259da550d207bda.tar.xz
manaverse-a69a87c5a81ddbf25a25c5549259da550d207bda.zip
Improve a bit iterators again.
Diffstat (limited to 'src/guichan/widget.cpp')
-rw-r--r--src/guichan/widget.cpp30
1 files changed, 9 insertions, 21 deletions
diff --git a/src/guichan/widget.cpp b/src/guichan/widget.cpp
index da221b8d5..8bae81141 100644
--- a/src/guichan/widget.cpp
+++ b/src/guichan/widget.cpp
@@ -94,9 +94,7 @@ namespace gcn
Widget::~Widget()
{
- DeathListenerIterator iter;
-
- for (iter = mDeathListeners.begin();
+ for (DeathListenerIterator iter = mDeathListeners.begin();
iter != mDeathListeners.end();
++iter)
{
@@ -122,8 +120,7 @@ namespace gcn
shadowColor = faceColor - 0x303030;
shadowColor.a = alpha;
- unsigned int i;
- for (i = 0; i < getFrameSize(); ++i)
+ for (unsigned int i = 0; i < getFrameSize(); ++i)
{
graphics->setColor(shadowColor);
graphics->drawLine(i, i, width - i, i);
@@ -471,8 +468,8 @@ namespace gcn
{
mGlobalFont = font;
- std::list<Widget*>::const_iterator iter;
- for (iter = mWidgets.begin(); iter != mWidgets.end(); ++iter)
+ for (std::list<Widget*>::const_iterator iter = mWidgets.begin();
+ iter != mWidgets.end(); ++iter)
{
if (!(*iter)->mCurrentFont)
(*iter)->fontChanged();
@@ -649,9 +646,7 @@ namespace gcn
void Widget::distributeResizedEvent()
{
- WidgetListenerIterator iter;
-
- for (iter = mWidgetListeners.begin();
+ for (WidgetListenerIterator iter = mWidgetListeners.begin();
iter != mWidgetListeners.end();
++ iter)
{
@@ -662,9 +657,7 @@ namespace gcn
void Widget::distributeMovedEvent()
{
- WidgetListenerIterator iter;
-
- for (iter = mWidgetListeners.begin();
+ for (WidgetListenerIterator iter = mWidgetListeners.begin();
iter != mWidgetListeners.end();
++ iter)
{
@@ -675,9 +668,7 @@ namespace gcn
void Widget::distributeHiddenEvent()
{
- WidgetListenerIterator iter;
-
- for (iter = mWidgetListeners.begin();
+ for (WidgetListenerIterator iter = mWidgetListeners.begin();
iter != mWidgetListeners.end();
++ iter)
{
@@ -688,8 +679,7 @@ namespace gcn
void Widget::distributeActionEvent()
{
- ActionListenerIterator iter;
- for (iter = mActionListeners.begin();
+ for (ActionListenerIterator iter = mActionListeners.begin();
iter != mActionListeners.end();
++iter)
{
@@ -700,9 +690,7 @@ namespace gcn
void Widget::distributeShownEvent()
{
- WidgetListenerIterator iter;
-
- for (iter = mWidgetListeners.begin();
+ for (WidgetListenerIterator iter = mWidgetListeners.begin();
iter != mWidgetListeners.end();
++iter)
{